Some Ambient Sounds Dont Play.

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Some Ambient Sounds Dont Play.

Post by Steve5563 »

Hi there.
just raising a issue that i have noticed with lots of ambient sounds placed in my map, 620 ambient sounds to be exact
this issue is that not all of them actually play when using gzdoom
even if i have duplicated the same ambient sound and placed it in another area of the same map.
if you get near the jump pads placed around the map and listen for the jump pad ambient sound, which is placed in the middle of each jump pad sector, you will notice not all of them play. currently tested this with 3.7.2
this has been a issue in previous versions and i don't know how far back it goes.
this bug can effect all the different types of ambient sounds in the library not just jump pad sfx,
the strange thing is when i play the map and have a listen to which sounds are working and which are not. i can then exit the game and close gzdoom down.
then i will restart gzdoom and jump back in the map again and i will notice that some sounds that were playing in the previous game are now not playing.
and the sounds that were not playing in the previous game are now playing. its like gzdoom picks and chooses what it wants to play.
yet when i play the map using zandronum 3.0 all the ambient sounds placed in the map work every single time.
you can play my map to hear what i mean.
cheers
Link to my map ---- https://www.moddb.com/games/doom-ii/add ... ground-v10
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Some Ambient Sounds Dont Play.

Post by Graf Zahl »

What's your amount of sound channels? GZDoom sets 64 by default, but for sound heavy maps a value of 256 would be better suited. This sounds just like your setting there is too low.
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Some Ambient Sounds Dont Play.

Post by Steve5563 »

yea i have the sound channels set to 256 and i tried different sound settings etc.... kinda went through everything to do with the sound settings to find the issue and no luck. but when i use zandronum 3.0 every ambient sound placed in the map works so not really sure what's going on. thanks for the reply
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Some Ambient Sounds Dont Play.

Post by Chris »

How long is the ambient sound, and are they set to play looping? 610 sounds is quite a lot, they can't all play simultaneously so the engine will play the nearest ones it can. For sounds that are looping, the ones that fail to play should regularly try to restart, preempting the farthest sound of lesser priority (or equal priority if it's closer). Any newly-started sound should also attempt a similar preemption. That's how it used to behave, anyway.
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Some Ambient Sounds Dont Play.

Post by Steve5563 »

yea all of the sounds are set up for looping, there is 41 ambient sounds in the library just duplicated that many times in the level which adds up to 620 placed in around the map, probably around 5 of them are activated and deactivated by script but they are a looping sound.
the sound lengths are 1 about minute long and under and some are as short as 6 seconds long and then they start looping again.
the sounds don't seem to try and restart like you mentioned.
the sounds that are a looping sound but are triggered on and off by scripting work every single time. its only the sounds that start playing and looping when the map is loaded.
the best sound to listen out for is the jumpads you will hear the issue very quickly as you move around the level and the jumpads play for 6 seconds before looping again.
so this kinda already shows that gzdoom is not trying to restart the sound. the thing is in some areas the jump pad sounds are playing and then if you go to a different area of the map where more jump pads are they don't have the sound playing yet i am using the same sound for all of them.
then if you restart the level you will notice that some sounds are now playing and others are not. its like gzdoom is says i have this amount of sounds that i can play and it randomly picks which ones its going to play every time the map is loaded.
yet when i play the map with zandronum 3.0 all the sounds work as they should.
necros
Posts: 19
Joined: Mon Dec 30, 2019 10:26 pm
Contact:

Re: Some Ambient Sounds Dont Play.

Post by necros »

I was going to make a new post about this, but I see this was reported last year. So I made a map recently, and it uses a few different ambient sounds. I've found that on the first load, all the sounds seem to play fine, but if you restart the map by going to the menu or typing map map01 into the console, seems like half of the ambient sounds no longer play.

in addition, i've found things like multiple moving sectors like stairs building will miss every 3rd or 4th step's stop sound or the moving sound gets cut off, not sure if that's related.

anyway, just wondering if this is a known issue? I also have my sound channels set to 256, and my map only had like 5 or so unique repeating ambient sounds.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Some Ambient Sounds Dont Play.

Post by _mental_ »

Could you please post a map that can be used to reproduce the problem?
necros
Posts: 19
Joined: Mon Dec 30, 2019 10:26 pm
Contact:

Re: Some Ambient Sounds Dont Play.

Post by necros »

_mental_ wrote:Could you please post a map that can be used to reproduce the problem?

Regarding the ambient sounds... I'm actually finding I can't reproduce it anymore. However, at some point I had upgraded to a new version of GZDoom so it's very possible the ambient sound issue was resolved.

Regarding the moving sector sounds, I can still reproduce that. here's a map with simple stairs demonstrating the issue:
http://shoresofnis.com/temp/stairs.wad

This is what I hear:
https://youtu.be/wb-yAbgtc2c

Thanks!
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Some Ambient Sounds Dont Play.

Post by Chris »

IIRC, GZDoom tries to detect whether multiple copies of the same sound tries to play near each other simultaneously, though I don't know what it considers "near" (within how many map units of each other?), or if it considers timing. The reason for it, I believe, was to prevent very loud sounds when you have multiple items stacked on each other, or in very close proximity, all picked up at the same time, or multiple moving sectors that are supposed to act as a single lift or crusher. That might not be the cause here, but it's something that came to mind.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Some Ambient Sounds Dont Play.

Post by Graf Zahl »

The default near limit is 256 map units but it can be configured per sound. And the default maximum of sounds to be played within that distance limit is 2. If that causes sounds not to be played the limit needs to be increased with the $limit command in SNDINFO. If you want stair sounds for all sectors this needs to be set to 0, i.e. unlimited.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Some Ambient Sounds Dont Play.

Post by _mental_ »

Indeed, every third sound is skipped thanks to the default near limit.

If you want all and every platform sounds to be played, you can achieve this with own SNDINFO lump.

Code: Select all

$limit plats/pt1_strt 0
$limit plats/pt1_mid 0
$limit plats/pt1_stop 0
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Some Ambient Sounds Dont Play.

Post by Chris »

Graf Zahl wrote:The default near limit is 256 map units but it can be configured per sound. And the default maximum of sounds to be played within that distance limit is 2. If that causes sounds not to be played the limit needs to be increased with the $limit command in SNDINFO. If you want stair sounds for all sectors this needs to be set to 0, i.e. unlimited.
How difficult would it be to make it so if a third copy of the sound is played within its radius limit, it stops an older (the oldest) copy of the sound to start the new one, rather than simply not playing it? That would fix the issue with the platforms in this case, since each stair would still play the stop sound by preempting a copy that's almost done anyway. As an optimization, it could keep the current behavior for sounds started on the same tic (no reason to preempt and restart a sound if the one to cut literally just started).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Some Ambient Sounds Dont Play.

Post by Graf Zahl »

That should be doable but needs to be optioned because we have no idea what will sound worse - stopping the old sound or not starting the new one. I think what really should be done is to distinguish between ambient and action sounds and use different limits for both. For ambience the limit of 2 needs to be kept, but for action sounds it should generally be lifted to at least 4.
necros
Posts: 19
Joined: Mon Dec 30, 2019 10:26 pm
Contact:

Re: Some Ambient Sounds Dont Play.

Post by necros »

Awesome, thank you so much for clearing this up for me! This way, I can create my own sndinfo, set unlimited duplicate sounds, then manually control how many sectors will create move sounds or which ones will only create stop sounds by using sound sequence entities that have no sounds attached!
Post Reply

Return to “Closed Bugs [GZDoom]”