Playing sound - priority weirdness

Started by Dave Gilbert, Fri 24/06/2016 17:40:00

Previous topic - Next topic

Dave Gilbert

I have set up my game to have several layers of sounds. Each with their own set of priorities:

1-  Music layer (set to priority Normal)
2 - ambient layer (also set to Normal)
3 - footstep sounds (set to VERY LOW)
4 - sound effects - (set to VERY HIGH)

I have one location where a character is doing a NON-BLOCKING animation - practicing with a sword - and everytime she swings the sword a "swish" sound plays. However, the swish does NOT play when the player character is walking (e.g., footstep sounds are playing). This most likely means that the footstep sounds are overwriting the sound effect, but that theoretically shouldn't happen because the footstep sounds have a lower priority level than the sword swish sound.

Here's an video showing the problem:
[embed=720,405]http://youtu.be/l1vzUJ0n1kI[/embed]

I am totally at a loss. Any light-shedding is appreciated!

-Dave


Mandle

#1
Are the swish and the footsteps IDed the same sound type in AGS? E.g: Both are "sounds"...

I've had problems with that myself and I think I remember solving them by designating one of the sounds as a new audio group. Or it's possible that I tried that as one of the many things that didn't work while trying to solve the issue, and that it just stuck in my mind.

Anyway: I don't think it is a priority issue. More that, for whatever reason, AGS cannot play both of the clips at the same time, and this is breaking the normal priority hierarchy somehow?

Unless of course the "swish" sound is subtle enough to be masked by the footsteps sound...Have you tried some kind of "If audio clip is playing show display message" test?

morganw

If these are wave files this looks like it could be some kind of playback issue in the engine, changing to OGG seemed to resolve the problem here.

Crimson Wizard

#3
Quote from: morganw on Sat 25/06/2016 13:10:05
If these are wave files this looks like it could be some kind of playback issue in the engine, changing to OGG seemed to resolve the problem here.

I think there was an issue that you cannot play two WAVs simultaneously, but I am not certain yet that this is the reason, or the only reason. I would think that priority will force one WAV over another on the same channel and also keep it staying there until it's finished.

Unless you have 2 or more channels for sounds, in that case this may be it.

I have not dealt with sound priorities in the past, I guess I need little research before I could give a more useful reply...

Dave Gilbert

Huh. I fiddled around and I fixed the problem.

I had assigned all the footstep sounds their own audiotype, called "Footsteps." The number of channels was set to "unlimited." I changed it to "1" and my problem went away! To be honest, I am not sure WHY it worked. But it did.

SMF spam blocked by CleanTalk