mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2024-12-13 06:01:19 +00:00
snd.c:
need to set dma.buffer to 0 so the sound devive gets mapped next time around. snd_dma.c: register the commands after initializing the sound so that you don't get errors about already existing commands if the sound init failed a previous time around.
This commit is contained in:
parent
2cd24175ce
commit
e90942f9b5
2 changed files with 5 additions and 3 deletions
|
@ -500,6 +500,7 @@ int SNDDMA_GetDMAPos(void) {
|
|||
* Reset the sound device for exiting
|
||||
*/
|
||||
void SNDDMA_Shutdown(void) {
|
||||
printf ("SNDDMA_Shutdown\n");
|
||||
#if 0
|
||||
if (snd_inited)
|
||||
{
|
||||
|
@ -526,6 +527,7 @@ void SNDDMA_Shutdown(void) {
|
|||
}
|
||||
} else {
|
||||
munmap (dma.buffer, dma.samples *dma.samplebits / 8);
|
||||
dma.buffer = 0L;
|
||||
}
|
||||
|
||||
close(audio_fd);
|
||||
|
|
|
@ -132,14 +132,14 @@ void S_Init (void)
|
|||
s_testsound = Cvar_Get ("s_testsound", "0", 0);
|
||||
s_primary = Cvar_Get ("s_primary", "0", CVAR_ARCHIVE); // win32 specific
|
||||
|
||||
if (!SNDDMA_Init())
|
||||
return;
|
||||
|
||||
Cmd_AddCommand("play", S_Play);
|
||||
Cmd_AddCommand("stopsound", S_StopAllSounds);
|
||||
Cmd_AddCommand("soundlist", S_SoundList);
|
||||
Cmd_AddCommand("soundinfo", S_SoundInfo_f);
|
||||
|
||||
if (!SNDDMA_Init())
|
||||
return;
|
||||
|
||||
S_InitScaletable ();
|
||||
|
||||
sound_started = 1;
|
||||
|
|
Loading…
Reference in a new issue