TrunX
Member
I think it's a well known problem that sound effects can get uncomfortably loud when they are played several times at the same time.
I have two solutions in mind and would like to hear which one is better and if there is a better alternative solution out there.
1)
This would hinder any sound to be played mor then once at the same time
2)
snd_list gets emptied at the end of each step.
This would allow the sound effects to be played with at least one frame of delay in parallel.
I have two solutions in mind and would like to hear which one is better and if there is a better alternative solution out there.
1)
Code:
audio_stop_sound(argument0);
var snd = audio_play_sound(argument0,argument1,argument2);
audio_sound_gain(snd, snd_volume, 0);
2)
Code:
if ds_list_find_index(snd_list,argument0) == -1
ds_list_add(snd_list,argument0);
else
exit;
var snd = audio_play_sound(argument0,argument1,argument2);
audio_sound_gain(snd, snd_volume, 0);
This would allow the sound effects to be played with at least one frame of delay in parallel.