// Linked list of known sfx
sfx_t *known_sfx = NULL;
-qboolean sound_started = false;
qboolean sound_spatialized = false;
// Fake dma is a synchronous faking of the DMA progress used for
void S_SoundInfo_f(void)
{
- if (!sound_started)
+ if (!shm)
{
Con_Print("sound system not started\n");
return;
{
Con_Print("S_Startup: SNDDMA_Init failed.\n");
shm = NULL;
- sound_started = false;
sound_spatialized = false;
return;
}
}
- sound_started = true;
-
Con_Printf("Sound format: %dHz, %d bit, %d channels\n", shm->format.speed,
shm->format.width * 8, shm->format.channels);
}
void S_Shutdown(void)
{
- if (!sound_started)
+ if (!shm)
return;
if (fakedma)
SNDDMA_Shutdown();
shm = NULL;
- sound_started = false;
sound_spatialized = false;
}
int ch_idx;
int skip;
- if (!sound_started || !sfx || nosound.integer)
+ if (!shm || !sfx || nosound.integer)
return -1;
if (!sfx->fetcher)
{
unsigned int i;
unsigned char *pbuf;
- if (!sound_started)
+ if (!shm)
return;
for (i = 0; i < total_channels; i++)
{
channel_t *target_chan;
- if (!sound_started || !sfx || nosound.integer)
+ if (!shm || !sfx || nosound.integer)
return;
if (!sfx->fetcher)
{
channel_t *ch, *combine;
matrix4x4_t basematrix, rotatematrix;
- if (!snd_initialized.integer || (snd_blocked > 0))
+ if (!snd_initialized.integer || (snd_blocked > 0) || !shm)
return;
Matrix4x4_Invert_Simple(&basematrix, listenermatrix);
{
unsigned endtime;
- if (!sound_started || (snd_blocked > 0))
+ if (!shm || (snd_blocked > 0))
return;
// Updates DMA time