niche request but here goes: I've implemented a dynamic music switcher - it flips between three mp3s maintaining the playback position, using events and some timer stuff. I preload the mp3 sounds as s1=Sound.new(1.mp3), s2.., s3.. first, then issue a s1:play() etc.
My problem is that issuing a sound:play on a mp3 does a temporary lock, so the game skips a beat (1 or 2 frames), presumably while things are being set up at machine level. As far as I understand Lua is a single thread?
So the question is, is there any chance of implementing Sound:play() to _return_ quicker with mp3s? It does not need to start playing quicker, merely to return the soundchannel quicker, even if playback hasn't started yet (getposition would return 0 and isplaying would return 1). I was thinking threads but even Lua's coroutines are not OS-level threads....