medfall

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

commit 65dcc5db07383af79312900574d2a7d2d72e7f7e
parent 9676f4205fa59a3682e0397213ba704ba282e447
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Feb  5 14:12:48 +0200

Make audio.cc compile on Windows

Diffstat:
audio.cc | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/audio.cc b/audio.cc @@ -56,14 +56,17 @@ int main( int argc, char ** argv ) { size_t n; SoundData sin_data = make_sin_wave( sound.sample_rate, 500 ); - PlayingSoundID sound_sin = 0; + PlayingSoundID sound_sin = INVALID_SOUND_ID; float volume = 1.0f; bool playing = false; - // audio_set_volume( sound_sin, volume ); + // mixer_set_volume( sound_sin, volume ); for( ;; ) { printf( "%f %s %u\n", volume, playing ? "playing" : "stopped", sound_sin ); +#if PLATFORM_WINDOWS + Sleep( 100 ); +#else getline( &line, &n, stdin ); if( strcmp( line, "+\n" ) == 0 ) { @@ -87,6 +90,7 @@ int main( int argc, char ** argv ) { else if( strcmp( line, "q\n" ) == 0 ) { break; } +#endif } audio_output_close( &output_device );