Hi @jongar,
How are you controlling audio channels in general? I see that you’re using channel 2 for “jumpSound”, while letting the audio engine find a free channel for the others.
The reason I ask is, can you stop all sounds when the scene will hide? Or do you want some sounds to continue playing? The latter is a little more tricky, but possible.
In any case, you should attempt to stop all sounds before you dispose() of the loaded handle.
Also, you might want to try looping backwards through the table when you dispose of the audio handles. This is because of how Lua iterates over a table while clearing items… if you do it forward (default) it can actually result in skipping every other instance. So, I would suggest this:
[lua]
for i=#myTable,1,-1 do
audio.dispose( tapTheSounds[myTable[i].name] )
tapTheSounds[myTable[i].name] = nil
end
[/lua]
Brent