mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
write 0s to the buffer when sound is blocked
This commit is contained in:
parent
bbdca8428a
commit
9baefa94bb
1 changed files with 8 additions and 4 deletions
|
@ -116,13 +116,17 @@ static int
|
|||
snd_jack_process (jack_nframes_t nframes, void *arg)
|
||||
{
|
||||
int i;
|
||||
jack_nframes_t j;
|
||||
|
||||
if (snd_blocked) {
|
||||
SND_ScanChannels ();
|
||||
return 0;
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
output[i] = (float *) jack_port_get_buffer (jack_out[i], nframes);
|
||||
if (snd_blocked) {
|
||||
SND_ScanChannels ();
|
||||
for (j = 0; j < nframes; j++)
|
||||
for (i = 0; i < 2; i++)
|
||||
output[i][j] = 0;
|
||||
return 0;
|
||||
}
|
||||
SND_PaintChannels (snd_paintedtime + nframes);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue