![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Functions | |
static void | Buffer_Callback (void *userdata, Uint8 *stream, int len) |
unsigned int | SndSys_GetSoundTime (void) |
Returns the number of sample frames consumed since the sound started. | |
qbool | SndSys_Init (snd_format_t *fmt) |
Create "snd_renderbuffer", attempting to use the chosen sound format, but accepting if the driver wants to change it (e.g. | |
qbool | SndSys_LockRenderBuffer (void) |
Get the exclusive lock on "snd_renderbuffer". | |
void | SndSys_SendKeyEvents (void) |
if the sound system can generate events, send them | |
void | SndSys_Shutdown (void) |
Stop the sound card, delete "snd_renderbuffer" and free its other resources. | |
void | SndSys_Submit (void) |
Submit the contents of "snd_renderbuffer" to the sound card. | |
void | SndSys_UnlockRenderBuffer (void) |
Release the exclusive lock on "snd_renderbuffer". | |
Variables | |
static int | audio_device = 0 |
static unsigned int | sdlaudiotime = 0 |
Definition at line 34 of file snd_sdl.c.
References snd_format_t::channels, Con_DPrintf(), developer_insane, snd_ringbuffer_t::endframe, snd_ringbuffer_t::format, int(), cvar_t::integer, snd_ringbuffer_t::maxframes, snd_ringbuffer_t::ring, S_MixToBuffer(), sdlaudiotime, snd_blocked, snd_renderbuffer, snd_usethreadedmixing, snd_ringbuffer_t::startframe, Sys_Error(), vid_activewindow, and snd_format_t::width.
Referenced by SndSys_Init().
Returns the number of sample frames consumed since the sound started.
Definition at line 209 of file snd_sdl.c.
References sdlaudiotime.
Referenced by S_PaintAndSubmit().
qbool SndSys_Init | ( | snd_format_t * | fmt | ) |
Create "snd_renderbuffer", attempting to use the chosen sound format, but accepting if the driver wants to change it (e.g.
7.1 to stereo or lowering the speed) Note: SDL automatically converts all formats, so this only fails if there is no audio
Definition at line 103 of file snd_sdl.c.
References audio_device, bound, Buffer_Callback(), ceil(), CeilPowerOf2(), snd_format_t::channels, Con_DPrint(), CON_ERROR, Con_Print(), Con_Printf(), Cvar_SetValueQuick(), cvar_t::integer, NULL, sdlaudiotime, snd_bufferlength, snd_channellayout, SND_CHANNELLAYOUT_AUTO, SND_CHANNELLAYOUT_STANDARD, Snd_CreateRingBuffer(), snd_renderbuffer, snd_threaded, snd_format_t::speed, cvar_t::value, and snd_format_t::width.
Referenced by S_Startup().
Get the exclusive lock on "snd_renderbuffer".
Definition at line 222 of file snd_sdl.c.
References audio_device.
Referenced by S_PaintAndSubmit(), S_StopAllSounds(), and S_StopChannel().
Stop the sound card, delete "snd_renderbuffer" and free its other resources.
Definition at line 174 of file snd_sdl.c.
References audio_device, Mem_Free, NULL, snd_ringbuffer_t::ring, and snd_renderbuffer.
Referenced by S_Shutdown().
Submit the contents of "snd_renderbuffer" to the sound card.
Definition at line 196 of file snd_sdl.c.
Referenced by S_PaintAndSubmit().
Release the exclusive lock on "snd_renderbuffer".
Definition at line 236 of file snd_sdl.c.
References audio_device.
Referenced by S_PaintAndSubmit(), S_StopAllSounds(), and S_StopChannel().
|
static |
Definition at line 29 of file snd_sdl.c.
Referenced by SndSys_Init(), SndSys_LockRenderBuffer(), SndSys_Shutdown(), and SndSys_UnlockRenderBuffer().
|
static |
Definition at line 28 of file snd_sdl.c.
Referenced by Buffer_Callback(), SndSys_GetSoundTime(), and SndSys_Init().