platform_audio_output.h (616B)
1 #pragma once 2 3 #include "intrinsics.h" 4 #include "platform.h" 5 #include "platform_atomic.h" 6 7 struct AudioOutputDevice; 8 9 struct AudioBuffer { 10 s16 samples[ 8192 ]; // about 0.2s at 44100Hz 11 atomic_u32 cursor; 12 }; 13 14 void audio_output_init(); 15 void audio_output_term(); 16 17 void audio_output_open( AudioOutputDevice * device ); 18 void audio_output_close( AudioOutputDevice * device ); 19 20 #if COMPILER_MINGW 21 #include "mingw_audio_output.h" 22 #elif PLATFORM_WINDOWS 23 #include "win32_audio_output.h" 24 #elif PLATFORM_LINUX 25 #include "linux_audio_output.h" 26 #elif PLATFORM_OSX 27 #include "darwin_audio_output.h" 28 #else 29 #error new platform 30 #endif