Sound Destruction Problems
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Sound Destruction Problems
Hi,
I know this has probably been asked numerous times (especially by me on IRC); but is there anything that can be done about the eight-slot limit that ZDoom has for sounds? It's very annoying to have sounds cancel each other out, even when both sounds are played on channel 0 and are from completely different actors.
Thanks
EDIT: I understand this is how the behavior goes, so it isn't a bug. But it's damn irritating :/
I know this has probably been asked numerous times (especially by me on IRC); but is there anything that can be done about the eight-slot limit that ZDoom has for sounds? It's very annoying to have sounds cancel each other out, even when both sounds are played on channel 0 and are from completely different actors.
Thanks
EDIT: I understand this is how the behavior goes, so it isn't a bug. But it's damn irritating :/
Re: Sound Destruction Problems
The issue isn't whst you think it is, because sound channels are actor independent. You are either hitting a sounds defined limit ($limit, default 3) or the global virtual channel limit (snd_channels, default 32).Sicamore wrote:It's very annoying to have sounds cancel each other out, even when both sounds are played on channel 0 and are from completely different actors.
Re: Sound Destruction Problems
I guess this means it's best to put $limit 0 on all the sounds
Re: Sound Destruction Problems
No, it's not. There are some sounds that are just awful if not limited. Especially for looping ambient sounds.
Re: Sound Destruction Problems
Well, the sounds in question that I do not want destroyedGez wrote:No, it's not. There are some sounds that are just awful if not limited. Especially for looping ambient sounds.
Re: Sound Destruction Problems
That's what we're worried about. Sound design is especially important when you only have a limited range of sounds to play. The last thing you want is the same sound to play back over and over again, or worse, the exact same sound overlapping itself 100 odd times (hell, 10 would be bad enough).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Sound Destruction Problems
The 32 global channels limit is really antiquated. It should be upped to 128 at least to get rid of these problems. I'd even recommend setting it to 256 to have the best experience.
Re: Sound Destruction Problems
Didn't someone say that about 12 a couple of years ago? 

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Sound Destruction Problems
Maybe. But ever since ZDoom switched to FModEx it really needs some more channels to work well.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: Sound Destruction Problems
The wiki says on snd_channels that large values require faster processor, how large the values need to be until a performance degradation is noticed (assuming there are loads of sounds are being played at the same time)?
Re: Sound Destruction Problems
I think this depends on processor. And I also think that, since the sound system is in a separate thread, you won't notice any performance degradation on a multicore CPU.
On the other hand, sometimes we get people asking to run ZDoom on hardware older than some of the forum members, so...
On the other hand, sometimes we get people asking to run ZDoom on hardware older than some of the forum members, so...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Sound Destruction Problems
I think the defaults should be adequate for current mid range hardware, not for ancient bottom of the barrel crap some people still use. The current defaults are for 10+ year old systems.
Re: Sound Destruction Problems
By the way, is there any FMOD-related reason for this limit, or is it purely arbitrary?
Because if 256 is a reasonable value to use now, the maximum should be quite above it -- maybe 1024.
Code: Select all
#define MAX_CHANNELS 256
Re: Sound Destruction Problems
The maximum isn't 256 (although there is a maximum that FMOD will allocate, which is 4095). Granted, 256 is the maximum ZDoom's sound menu will allow in the slider.Gez wrote:By the way, is there any FMOD-related reason for this limit, or is it purely arbitrary?Because if 256 is a reasonable value to use now, the maximum should be quite above it -- maybe 1024.Code: Select all
#define MAX_CHANNELS 256
FMOD runs on a separate thread, so as long as you have a multicore processor, ZDoom won't slow down if FMOD does. Slowing FMOD down is entirely CPU dependent, however, as Gez stated.Blue Shadow wrote:The wiki says on snd_channels that large values require faster processor, how large the values need to be until a performance degradation is noticed (assuming there are loads of sounds are being played at the same time)?
There is one catch, though, and that is if you don't have enough channels for all the sounds that want to play. If you have maxed out your current virtual channels, and the more sounds that want to replace old sounds, and the more channels you have to potentially replace, the slower ZDoom gets. You can actually see ZDoom's framerate take a dive from 35 to 1 if you have 4095 simultaneous sounds playing, with 4095 virtual channels, and try to play 1 more.
Also, on that note, snd_channels only takes affect when you restart FMOD. Should the channels slider be moved below "Restart Sound"?
Re: Sound Destruction Problems
There are only two places where snd_channels is actually used. The first:
Okay, fine so far. But on the second:
Code: Select all
result = Sys->setSoftwareChannels(snd_channels + NUM_EXTRA_SOFTWARE_CHANNELS);
Code: Select all
result = Sys->init(MAX(*snd_channels, MAX_CHANNELS), initflags, 0);
Last edited by Gez on Tue Jan 14, 2014 5:33 am, edited 3 times in total.