mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 17:31:08 +00:00
add snd_force_unblock as an attempt to work around stuck sound on focus changes
This commit is contained in:
parent
c3e8b5de3d
commit
e52940a3db
2 changed files with 20 additions and 0 deletions
|
@ -361,6 +361,13 @@ s_startup (void)
|
|||
sound_started = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
s_snd_force_unblock (void)
|
||||
{
|
||||
snd_blocked = 1;
|
||||
s_unblock_sound ();
|
||||
}
|
||||
|
||||
static void
|
||||
s_init (void)
|
||||
{
|
||||
|
@ -372,6 +379,8 @@ s_init (void)
|
|||
"Stops all sounds currently being played");
|
||||
Cmd_AddCommand ("soundinfo", s_soundinfo_f,
|
||||
"Report information on the sound system");
|
||||
Cmd_AddCommand ("snd_force_unblock", s_snd_force_unblock,
|
||||
"fix permanently blocked sound");
|
||||
|
||||
snd_interp = Cvar_Get ("snd_interp", "1", CVAR_ARCHIVE, NULL,
|
||||
"control sample interpolation");
|
||||
|
|
|
@ -40,6 +40,7 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
#include <stdlib.h>
|
||||
#include <jack/jack.h>
|
||||
|
||||
#include "QF/cmd.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/hash.h"
|
||||
#include "QF/plugin.h"
|
||||
|
@ -99,6 +100,13 @@ s_unblock_sound (void)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
s_snd_force_unblock (void)
|
||||
{
|
||||
snd_blocked = 1;
|
||||
s_unblock_sound ();
|
||||
}
|
||||
|
||||
static void
|
||||
snd_jack_xfer (int endtime)
|
||||
{
|
||||
|
@ -144,6 +152,9 @@ s_init (void)
|
|||
snd_shm = &_snd_shm;
|
||||
snd_shm->xfer = snd_jack_xfer;
|
||||
|
||||
Cmd_AddCommand ("snd_force_unblock", s_snd_force_unblock,
|
||||
"fix permanently blocked sound");
|
||||
|
||||
snd_interp = Cvar_Get ("snd_interp", "1", CVAR_ARCHIVE, NULL,
|
||||
"control sample interpolation");
|
||||
snd_volume = Cvar_Get ("volume", "0.7", CVAR_ARCHIVE, NULL,
|
||||
|
|
Loading…
Reference in a new issue