• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[SOLVED] Simultaneous sounds are played one after the other

J

jana

Guest
I'm playing two sounds:
Code:
 audio_play_sound(snd_eff4, 10, false);
 audio_play_sound(snd_aay4, 10, false);
and they should sound simultaneous. I've done this in the past. But this time, there's a huge gap between the sounds, maybe a quarter of a second. They're actually being played in sequence.

And what's really odd is the sound that comes second in the code is being played first.

Why could this be happening? Any ideas on how to fix it? I tried changing the compressing settings, no change.
 
C

CptChuckles

Guest
one of them is probably loaded into RAM before the other one.

are they both the same file format? are they different in size?
 
J

jana

Guest
They're the same format, MP3, and the same length. They're music notes, lasting 10 seconds. I want them to sound together.
 
J

jana

Guest
See this

Make sure they have the same attributes.
I went to your link, and the following caught my eye, since the issue is timing:
In general, Wave files (*.wav) are used for the short sound effects as even though they are generally larger files they will play instantaneously due to the fact that they do not need any type of decoding for playing.
So I switched from the MP3 to the WAV version of each sound. Problem solved. Thank you!
 
Top