#include #include #include #include using namespace std; #define internal static #define CHANNELS 2 typedef float Real32; static Real32 PI = 3.14159265359; static Real32 TAU = 2*PI; static Uint32 SDL_AUDIO_TRANSPARENTLY_CONVERT_FORMAT = 0; //############################################################################ struct LaserBoy_audio_thread_state { bool running; SDL_Event last_event; }; //############################################################################ struct LaserBoy_audio_config { int ToneHz; int ToneVolume; int WavePeriod; int sample_rate; int num_channels; int bytes_per_sample; int sample_index; }; //############################################################################ struct LaserBoy_audio_buffer { u_char* buffer; int size_in_bytes; int read_from; int write_to; SDL_AudioDeviceID device_ID; LaserBoy_audio_config* audio_config; }; //############################################################################ struct LaserBoy_audio_thread_context { LaserBoy_audio_buffer* audio_buffer; LaserBoy_audio_thread_state* audio_thread_state; }; //############################################################################ ////////////////////////////////////////////////////////////////////////////// //############################################################################