14 #include "../stdafx.h" 21 #include "../safeguards.h" 34 MxMixSamples(stream, len / 4);
41 const char *s =
SdlOpen(SDL_INIT_AUDIO);
42 if (s != NULL)
return s;
45 spec.format = AUDIO_S16SYS;
49 MxInitialize(spec.freq);
50 SDL_CALL SDL_OpenAudio(&spec, &spec);
51 SDL_CALL SDL_PauseAudio(0);
57 SDL_CALL SDL_CloseAudio();
Factory for the SDL sound driver.
const char * SdlOpen(uint32 x)
Open the SDL library.
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.
void SdlClose(uint32 x)
Close the SDL library.
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.