sasq64 / chipmachine

Demoscene/Retro Music Player
200 stars 12 forks source link

Don't stop music played if the next music choosed cant be read #41

Open LittleWhite-tb opened 8 years ago

LittleWhite-tb commented 8 years ago

Hello,

If ChipMachine is playing a particular file and the user select a new file, the music will be stopped even if the new file can't be played. In such case (unable to play the new song), I expect that the current song will continue to play.

sasq64 commented 8 years ago

This could work for some plugins, but many plugins are based on emulators that are not written to be reentrant and allow multiple versions to run simultaneously. But if I know before hand that it wont work I can avoid running the plugin...

jpyper commented 8 years ago

Is there a way to test the following song before loading it into the main routine to play it? I would make some kind of sub routine that would grab the next tune file, test it to make sure it is playable, if successful break the current playing tune to start the new one. If the new one fails the test, just display the unplayable notification and keep the current tune playing.

It makes sense in my head, but implementing it might be a while other bucket of worms.

sasq64 commented 8 years ago

Like I tried to explain in my earlier comment, this i not possible for many plugins. UADE for instance, is based on the UAE amiga emulator and has lots of global variables, and so you can only have a single instance.