Skip to content

Commit f301a5c

Browse files
committed
Use current_time as audio priority
so audio cutoffs are not noticeable
1 parent f8fc5a6 commit f301a5c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/play_sound/play_sound.gml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function play_sound() {
3333
if (realstereo = 0) audio_emitter_position(emitter,pan,0,0)
3434
else audio_emitter_position(emitter,100,0,0)
3535

36-
audio_play_sound_on(emitter,ins.sound, 0, 0)
36+
audio_play_sound_on(emitter,ins.sound, 0, current_time)
3737
sounds++
3838

3939
//Schedule emitter to be deleted from memory
@@ -62,9 +62,10 @@ function play_sound() {
6262
var emitter_x = 100
6363
if (realstereo = 0) emitter_x = pan
6464

65-
var soundid = audio_play_sound_at(ins.sound, emitter_x, 0, 0, 100, 300, 1, false, 1)
65+
var soundid = audio_play_sound_at(ins.sound, emitter_x, 0, 0, 100, 300, 1, false, current_time)
6666
audio_sound_gain(soundid, emitter_gain, 0)
6767
audio_sound_pitch(soundid, emitter_pitch)
68+
6869
sounds++
6970

7071
//Schedule emitter to be deleted from memory

0 commit comments

Comments
 (0)