Why does Snap! have issues with sound?

After sounds are played enough times, the page goes silent, why does this happen?

What browser are you using?

I copied this from chrome://version
121.0.6167.188 (Official Build) (64-bit)

Oh, ok. I was really only asking what browser not version, because safari has issues with sound (because apple sucks). I have a feeling I know why the sound is going away for you, but I don't know how to actually explain it (and I'm not entirely sure I would even say the right thing).

I was able to recreate it, it happened at some point after "count" reached 200.

Here is a workaround in this project

bug with sound

That's pretty cool. Will be using it sometime.

this is going to get a bit technical but bear with me here.

you might've exceeded a limit of some sort, most programs don't use THAT many sounds ever. i assume this is because Snap! uses only one AudioContext, but I can't be sure about that, as I don't know how the internals of that work. I know Snap's internals quite well and there doesn't seem to be a limit, but you might've reached a general limit completely unrelated to Snap!

This happens because DOM nodes are created without deleting them. DOM nodes that are created can make more lag, and therefore too many of them will cause the sounds to stop.

Snap! encounters issues with sound primarily due to limitations in web browser environments, including browser compatibility, network conditions, and software bugs. Additionally, resource constraints on user devices can impact sound playback. To mitigate these issues, users should ensure browser compatibility, optimize network performance, use supported sound formats, and report any encountered bugs to the Snap! development team.

I'm also having issues with sound on snap. when will snap fix this?

Probably you should see this:

For a workaround, use this:
[scratchblocks]play sound [ v] at (44100 v) Hz :: sound[/scratchblocks]

I don't recall ever getting stuck while using the TuneScope library. Have they found a way around this problem?

The TuneScope library uses Tone.js to play the audio. Tone.js is a library specifically made to play synthesized music and has been around for a very very long time, so it has had time to figure things out. Snap on the other hand, is not just audio, so it has not had time to figure things out. I don't think snap should use Tone.js, as it is made for playing interactive music, not playing audio files that a user provides.