Sound Destruction Problems

Archive of the old editing forum
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.
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

Sound Destruction Problems

Post by Sicamore »

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 :/
User avatar
edward850
Posts: 5889
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Sound Destruction Problems

Post by edward850 »

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.
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).
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

Re: Sound Destruction Problems

Post by Sicamore »

I guess this means it's best to put $limit 0 on all the sounds
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Sound Destruction Problems

Post by Gez »

No, it's not. There are some sounds that are just awful if not limited. Especially for looping ambient sounds.
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

Re: Sound Destruction Problems

Post by Sicamore »

Gez wrote:No, it's not. There are some sounds that are just awful if not limited. Especially for looping ambient sounds.
Well, the sounds in question that I do not want destroyed
User avatar
edward850
Posts: 5889
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Sound Destruction Problems

Post by edward850 »

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).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Sound Destruction Problems

Post by Graf Zahl »

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.
User avatar
edward850
Posts: 5889
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Sound Destruction Problems

Post by edward850 »

Didn't someone say that about 12 a couple of years ago? :P
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Sound Destruction Problems

Post by Graf Zahl »

Maybe. But ever since ZDoom switched to FModEx it really needs some more channels to work well.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Sound Destruction Problems

Post by Blue Shadow »

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)?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Sound Destruction Problems

Post by Gez »

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...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Sound Destruction Problems

Post by Graf Zahl »

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.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Sound Destruction Problems

Post by Gez »

By the way, is there any FMOD-related reason for this limit, or is it purely arbitrary?

Code: Select all

#define MAX_CHANNELS				256
Because if 256 is a reasonable value to use now, the maximum should be quite above it -- maybe 1024.
User avatar
edward850
Posts: 5889
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Sound Destruction Problems

Post by edward850 »

Gez wrote:By the way, is there any FMOD-related reason for this limit, or is it purely arbitrary?

Code: Select all

#define MAX_CHANNELS				256
Because if 256 is a reasonable value to use now, the maximum should be quite above it -- maybe 1024.
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.
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)?
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.
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"?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Sound Destruction Problems

Post by Gez »

There are only two places where snd_channels is actually used. The first:

Code: Select all

	result = Sys->setSoftwareChannels(snd_channels + NUM_EXTRA_SOFTWARE_CHANNELS);
Okay, fine so far. But on the second:

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.
Locked

Return to “Editing (Archive)”