Hi, I have some sound channels set up to change volume, play sounds and pause dynamically through events. But I get these errors on each frame if a sound is not being played on a channel and I’m changing it’s volume or pausing it etc.
I can add conditions to my events to check first if a sound is being played or not, but it would be a complicated task because I have a lot of events and variables to deal with, and makes the logic more complicated.
I don’t see any effects on the game, but I don’t know if I can just ignore them, or are they a bad thing and may cause issues later.
I had that issue with one of my first projects and I fixed it by adding conditions as you mentioned. I don’t know if it would have caused issues with performance to leave them throwing errors but I don’t like to see errors in the console so it was decision to fix them for personal reasons. I don’t even think the error messages make it into a release, just debug, so aside from it checking every frame if the sound is playing there is probably no issue caused from it. And depending on the project, if it is light enough you can get away with a few things like something checking every frame.
Like you I had tons of sounds etc to deal with and it was a pretty tedious task to go through and fix it all. That is probably why to this day I don’t do anything without checking first - if object is visible hide it, if storage exists load it, if sound is playing pause it. This probably causes issues with performance in its own way, but the horror of watching those “Cannot pause non-existing sound on channel 8.” pile up in the console has stuck with me after all this time.
Thanks for your answer! I don’t like errors either and they’re pretty disturbing to see them pile up every frame for minutes, and I’ll probably do what you did at some point. But if these are just a debug thing and nothing more serious, I can ignore them for now and fix them some other day!