14 #include "../stdafx.h" 20 #include "../safeguards.h" 33 MxMixSamples(stream, len / 4);
42 if (SDL_WasInit(SDL_INIT_EVERYTHING) == 0) {
43 ret_code = SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE);
44 }
else if (SDL_WasInit(SDL_INIT_AUDIO) == 0) {
45 ret_code = SDL_InitSubSystem(SDL_INIT_AUDIO);
47 if (ret_code == -1)
return SDL_GetError();
50 spec.format = AUDIO_S16SYS;
54 MxInitialize(spec.freq);
55 SDL_OpenAudio(&spec, &spec);
63 SDL_QuitSubSystem(SDL_INIT_AUDIO);
64 if (SDL_WasInit(SDL_INIT_EVERYTHING) == 0) {
Factory for the SDL sound driver.
void Stop()
Stop this driver.
static FSoundDriver_SDL iFSoundDriver_SDL
Factory for the SDL sound driver.
const char * Start(const char *const *param)
Start this driver.
int GetDriverParamInt(const char *const *parm, const char *name, int def)
Get an integer parameter the list of parameters.
static void CDECL fill_sound_buffer(void *userdata, Uint8 *stream, int len)
Callback that fills the sound buffer.
Base fo playing sound via SDL.