The change is simply to add a button that effectively reloads the MP3, something like:
Code: Select all
if (component == button1) {
if (doubleValue == 1) sound.LoadFromResource("ElectroTrash.mp3");
}
- Launch in debug mode with hack as described above
- Flip switch to start playback - all good!
- Flip switch to stop playback
- Click button to re-load MP3
- Flip switch to start playback
- CRASH in VoltageSound_ReadSamples()
I get the same issue when loading from a file and thought it might be specific to that, but apparently not.
Any help and / or thoughts much appreciated!
Cheers, -Rob at WI.