mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
slightly cleaner
This commit is contained in:
parent
fd6a856ae1
commit
01f7bd440e
1 changed files with 4 additions and 12 deletions
|
@ -339,21 +339,13 @@ s_pick_channel (int entnum, int entchannel, int looped)
|
||||||
}
|
}
|
||||||
_ch = &(*_ch)->next;
|
_ch = &(*_ch)->next;
|
||||||
}
|
}
|
||||||
// check for finished looped sounds
|
|
||||||
// normally, this wouldn't happen, but when using the non-threaded mixer
|
|
||||||
// it seems to
|
|
||||||
for (_ch = &looped_dynamic_channels; *_ch; ) {
|
|
||||||
if (!(*_ch)->sfx || (*_ch)->done) {
|
|
||||||
SND_ChannelStop (unlink_channel (_ch));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
_ch = &(*_ch)->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
// non-looped sounds are used to stop looped sounds on an ent channel
|
// non-looped sounds are used to stop looped sounds on an ent channel
|
||||||
|
// also clean out any caught by SND_ScanChannels
|
||||||
for (_ch = &looped_dynamic_channels; *_ch; ) {
|
for (_ch = &looped_dynamic_channels; *_ch; ) {
|
||||||
if ((*_ch)->entnum == entnum
|
if (!(*_ch)->sfx || (*_ch)->done
|
||||||
&& ((*_ch)->entchannel == entchannel || entchannel == -1)) {
|
|| ((*_ch)->entnum == entnum
|
||||||
|
&& ((*_ch)->entchannel == entchannel || entchannel == -1))) {
|
||||||
SND_ChannelStop (unlink_channel (_ch));
|
SND_ChannelStop (unlink_channel (_ch));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue