mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
clamp the default renderer to 44100 too, and spew messages when running out of channels.
This commit is contained in:
parent
3609a2215e
commit
6678e67f05
2 changed files with 11 additions and 3 deletions
|
@ -81,8 +81,6 @@ SND_AllocChannel (void)
|
|||
channel_t **free = &free_channels;
|
||||
channel_t *chan;
|
||||
|
||||
if (!*free) // definitely nothing free
|
||||
return 0;
|
||||
while (*free) {
|
||||
if (!(*free)->sfx) // free channel
|
||||
break;
|
||||
|
@ -92,8 +90,14 @@ SND_AllocChannel (void)
|
|||
Sys_Error ("SND_AllocChannel: bogus channel free list");
|
||||
free = &(*free)->next;
|
||||
}
|
||||
if (!*free)
|
||||
if (!*free) {
|
||||
int num_free = 0;
|
||||
for (free = &free_channels; *free; free = &(*free)->next) {
|
||||
num_free++;
|
||||
}
|
||||
Sys_Printf ("SND_AllocChannel: out of channels. %d\n", num_free);
|
||||
return 0;
|
||||
}
|
||||
chan = *free;
|
||||
*free = chan->next;
|
||||
if (chan->sfx) {
|
||||
|
|
|
@ -351,6 +351,10 @@ s_startup (void)
|
|||
return;
|
||||
}
|
||||
snd_shm->xfer = s_xfer_paint_buffer;
|
||||
if (snd_shm->speed > 44100) {
|
||||
Sys_Printf ("FIXME clamping Sps to 44100 until resampling is fixed\n");
|
||||
snd_shm->speed = 44100;
|
||||
}
|
||||
|
||||
sound_started = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue