Small stuph.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@297 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1ba53e017e
commit
5fbe74b582
31 changed files with 884 additions and 528 deletions
|
@ -95,9 +95,11 @@ void S_BlockSound (void)
|
|||
|
||||
for (sc = sndcardinfo; sc; sc=sc->next)
|
||||
{
|
||||
if (sc->snd_iswave)
|
||||
if (snd_blocked == 1)
|
||||
waveOutReset (sc->hWaveOut);
|
||||
if (sc->snd_iswave && !sc->inactive_sound)
|
||||
{
|
||||
if (snd_blocked == 1)
|
||||
waveOutReset (sc->hWaveOut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -421,7 +423,7 @@ Direct-Sound support
|
|||
*/
|
||||
sndinitstat SNDDMA_InitDirect (soundcardinfo_t *sc)
|
||||
{
|
||||
extern cvar_t snd_khz, snd_eax, snd_speakers;
|
||||
extern cvar_t snd_khz, snd_eax, snd_speakers, snd_inactive;
|
||||
DSBUFFERDESC dsbuf;
|
||||
DSBCAPS dsbcaps;
|
||||
DWORD dwSize, dwWrite;
|
||||
|
@ -613,7 +615,12 @@ sndinitstat SNDDMA_InitDirect (soundcardinfo_t *sc)
|
|||
// create the secondary buffer we'll actually work with
|
||||
memset (&dsbuf, 0, sizeof(dsbuf));
|
||||
dsbuf.dwSize = sizeof(DSBUFFERDESC);
|
||||
dsbuf.dwFlags = DSBCAPS_CTRLFREQUENCY | /*DSBCAPS_LOCSOFTWARE |*/ DSBCAPS_GLOBALFOCUS; //dmw 29 may, 2003 removed locsoftware
|
||||
dsbuf.dwFlags = DSBCAPS_CTRLFREQUENCY; //dmw 29 may, 2003 removed locsoftware
|
||||
if (snd_inactive.value)
|
||||
{
|
||||
dsbuf.dwFlags |= DSBCAPS_GLOBALFOCUS;
|
||||
sc->inactive_sound = true;
|
||||
}
|
||||
dsbuf.dwBufferBytes = SECONDARY_BUFFER_SIZE;
|
||||
dsbuf.lpwfxFormat = (WAVEFORMATEX *)&format;
|
||||
|
||||
|
@ -987,6 +994,8 @@ int SNDDMA_Init(soundcardinfo_t *sc)
|
|||
if (COM_CheckParm ("-wavonly"))
|
||||
wavonly = true;
|
||||
|
||||
sc->inactive_sound = false; //don't generate sound when the window is inactive.
|
||||
|
||||
#ifndef NODIRECTX
|
||||
sc->dsound_init =
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue