It’s simple to rewind and stop all audio, but how to dispose of all audio without having to name each of its handlers in turn (as below).
audio.dispose(vars.soundtrack1); vars.soundtrack1 = nil
audio.dispose(vars.soundtrack2); vars.soundtrack2 = nil
audio.dispose(vars.sfx1); vars.sfx1 = nil
audio.dispose(vars.sfx2); vars.sfx2 = nil
audio.dispose(vars.sfx2); vars.sfx2 = nil
audio.dispose(vars.sfx2); vars.sfx2 = nil
audio.dispose(vars.sfx2); vars.sfx2 = nil
We have 30 pages of up to 20 audio files each page. It seems to be needless work to have to use audio.dispose and nil each one.
As you can see, we have put all the handlers in a table called vars {}. Can the table be emptied and nil’ed and would that dispose of the audio somehow?
Ideas would be appreciated, thanks.