Multiple objects play the same sound at the same time

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TimTest


I have a problem, I wanted to finish an older project of mine, but there is a problem with the sound.

In the project, several objects play the same sound at the same time, this causes the sound to reach a very high volume.

Is there maybe a way to prevent this?
That even if the sound is played multiple times, this effect does not occur?

This may be a strange question but I hope you can help me.

(It is a 2D project)


:bust_in_silhouette: Reply From: Gluon

Well you havent given us very much to go on here, there is no indication of how you have set your code up and so its very hard to say how to fix it.

All I can do is give you some general advice. If you are playing all of the sounds through the same audiostream you could check if it is playing and only play if it isnt playing

if not $yourAudiostramplayer.is_playing():
	your code here

this will only work if they are all using the same audioplayer though, if not they wont detect it.