void S_StopAllSounds(qboolean clear);
void S_StopAllSoundsC(void);
+void S_ClearBuffer (void);
+
+
// =======================================================================
// Internal sound data & structures
// =======================================================================
unsigned int total_channels;
int snd_blocked = 0;
-static qboolean snd_ambient = 1;
cvar_t snd_initialized = { CVAR_READONLY, "snd_initialized", "0"};
cvar_t snd_streaming = { CVAR_SAVE, "snd_streaming", "1"};
int fakedma_updates = 15;
-void S_AmbientOff (void)
-{
- snd_ambient = false;
-}
-
-
-void S_AmbientOn (void)
-{
- snd_ambient = true;
-}
-
-
void S_SoundInfo_f(void)
{
if (!sound_started || !shm)
Con_Printf("%5d samplepos\n", shm->samplepos);
Con_Printf("%5d samplebits\n", shm->format.width * 8);
Con_Printf("%5d speed\n", shm->format.speed);
- Con_Printf("0x%x dma buffer\n", shm->buffer);
+ Con_Printf("%p dma buffer\n", shm->buffer);
Con_Printf("%5u total_channels\n", total_channels);
}
}
}
+void S_SetChannelVolume (unsigned int ch_ind, float fvol)
+{
+ channels[ch_ind].master_vol = fvol * 255;
+}
+
+
void S_ClearBuffer(void)
{
int clear;
for (ambient_channel = 0 ; ambient_channel < NUM_AMBIENTS;ambient_channel++)
channels[ambient_channel].sfx = NULL;
- if (!snd_ambient || ambient_level.value <= 0 || !cl.worldmodel || !cl.worldmodel->brush.AmbientSoundLevelsForPoint)
+ if (ambient_level.value <= 0 || !cl.worldmodel || !cl.worldmodel->brush.AmbientSoundLevelsForPoint)
return;
cl.worldmodel->brush.AmbientSoundLevelsForPoint(cl.worldmodel, listener_vieworigin, ambientlevels, sizeof(ambientlevels));