medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit efecbaa598f00003f125b2abb5fac486cf5ed959
parent e00ae5cb6b72c1ab04711b74c1c88e8a353ed90c
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Nov  1 12:31:36 +0000

Small cleanup

Diffstat:
linux_audio.cc | 13+++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/linux_audio.cc b/linux_audio.cc @@ -8,13 +8,11 @@ #define FRAMES 1024 -short buffer[ FRAMES ][ 2 ]; // stereo - -int milliseconds( int ms ) { +static int milliseconds( int ms ) { return ms * 1000; } -void error_handler( const char * file, int line, const char * function, int err, const char * fmt, ... ) { +static void error_handler( const char * file, int line, const char * function, int err, const char * fmt, ... ) { printf( "error in %s at %s:%d\n", file, function, line ); va_list args; @@ -24,7 +22,7 @@ void error_handler( const char * file, int line, const char * function, int err, printf( "\n" ); } -u8 memory[ megabytes( 64 ) ]; +static u8 memory[ megabytes( 64 ) ]; int main( int argc, char ** argv ) { snd_lib_error_set_handler( error_handler ); @@ -63,11 +61,6 @@ int main( int argc, char ** argv ) { // if (snd_output_stdio_attach(&log, stderr, 0) >= 0) { // snd_pcm_dump(pcm, log); snd_output_close(log); } - // for( int i = 0; i < FRAMES; i++ ) { - // buffer[i][0] = 16384*sin(2*M_PI*i/128) + 6553*sin(4*M_PI*i/128); - // buffer[i][1] = 0; - // } - for( u32 i = 0; i < sound.num_samples; ) { s16 * channels[ 2 ] = { sound.samples + i, sound.samples + sound.num_samples + i };