Description
Hello, I have tried to make another project which involves checking if a sound is already playing each tick of the chip as it only needs to be put on just once and then the pitch and volume is adjusted during it's use. I however utilized the use of soundPlaying() to check if the sound is already playing to prevent excessive sound resource use, but it seems to be unrealiable at times and causes even second long gaps at the update, this is very bad as during that second my chip reinitiates the sound to start playing and causes massive lag to server and myself... I'm unsure if I can use some conditional myself to prevent this from happening as a bypass, but I wanted to ask if someone more experienced has ran to same problem and if it's a bug or whether there's something I've overlooked.
The basically simplest setup to replicate the issue in my opinion is just making following setup, as I've managed to in my opinion to narrow it to the sound commands themselves. The result is choppy spammy sound that repeats from the sounds start, and since no other block of commands initiates the soundPlay of that particular sound it has to be here as there's no way the stopSound block is accidentally triggering as it's specific parameters aren't met. Thanks for whoever looks into this stuff btw!
if(!soundPlaying("EntitySound"))
{
Entity:soundPlay("EntitySound",soundDuration(SoundPath),SoundPath)
}
runOnTick(1)