This might not be very urgent as you can just, don’t stop the sound before disposing it, but thought it was good to report never the less.
The exception that you get is InvalidStateError: The object is in an invalid state and here is a playground with the repro link. This exception is thrown (only in Safari) if you call stop() twice on an AudioBufferSourceNode. The reason why this might be called twice is because the property this.isPlaying is updated asynchronously after the first stop, and a dispose will try to stop the sound again.
I don’t think this is urgent and feel free to close it but I just wanted to point this out as Safari is not the most common browser and this might lead to other types of bugs if you are not expecting a throw when disposing a sound.
there is still an error like this when calling stop and then dispose in Safari. It occurs only on some devices/os versions I think and I don’t have any of those, so it’s hard for me to reproduce.
It could also be that the same error regressed. The thing I’m most worried about is that a crash in the dispose()->stop() code prevents the rest of the actual disposing, leading to memory leaks.
I think it should be the same repro as OP.
The error is “stop@[native code]”.
The crashed iOS UserAgents all have “OS 14_3 like Mac OS X” or “OS 14_4 like Mac OS X”.
14_6 and higher don’t crash.
For Mac I got crashed Version/14.0.2 and Version/14.0.3 and not crashed 14.1.2+