Can't play two fx sounds simultaneously, am I dumb?

Started by Héctor Bometón, Mon 11/03/2019 14:09:07

Previous topic - Next topic

Héctor Bometón


Hi!

So... I thought I wasn't a "begginer" anymore since it's been a couple years developing my game and I'm pretty confident with my AGS skills, but I'm having some stupid basic problems adding sound to my demo lately.

The thing is... I can't manage to play more than two sounds simultaneously. I can have background music playing AND trigger ONE sound, and I can hear both no problem, but... music playing or not, if I try to play TWO FX SOUNDS, (directly from script or triggering an animation that includes frames with sounds), the first one to be triggered sounds over the second one, and only when it's finished, you can hear the ending of the second one (if it happens to be longer).

I read all about sound and channels in the tutorials, but I can't figure out the problem. It's not about sound prioritys, that's all I can say (not 100% sure, but tried "everything" with that and I wasn't lucky).

Seems so simple... I just want to have music and a couple fx sounds playing. I know AGS is capable of this, but I'm not.

Currently using Build 3.5.0.6 BETA VERSION, January 2019.

Thanks!  :=

Héctor Bometón

Quote from: Héctor Bometón on Mon 11/03/2019 14:09:07
[...] the first one to be triggered sounds over the second one, and only when it's finished, you can hear the ending of the second one (if it happens to be longer).

In case I didn't explaing it well enough, by that I DON'T mean that the two sounds OVERLAP. The second sounds is muted till the first one is done.

Snarky

What is the code you're using? How do you have your audio types set up (particularly the MaxChannels setting)?

Héctor Bometón


MaxChannels have the default settings.

BUT...

It seems like the problem was the fx sounds I imported were too short ????

Some of them are under half a second length (gun shot, radio beep...). I just added some silence at the end of each file and now it's working!!

Thank you and sorry!  :tongue: :tongue: :tongue:

Monsieur OUXX

It's really weird. I think you should post your code.
 

eri0o

And maybe audiofiles... I've seen some wav files that doesn't work.

WHAM

I've had experiences with AGS before where extremely short audio files would not play at all. Stuff that was half a second or less. In the cases where I encountered this I edited the sound files, adding some blank audio after them to push their length over 1 second. Quick and dirty fix, but it's served its purpose for me so far.
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

SMF spam blocked by CleanTalk