ValleyBell / vgmplay-libvgm

a new VGMPlay, based on libvgm
74 stars 10 forks source link

Add support for opening files in existing instance of program #11

Open Nicholas-Steel opened 2 years ago

Nicholas-Steel commented 2 years ago

Would be nice if it was possible to be able to double click audio files and have them play in the existing instance of the VGM Player instead of opening a new instance and having multiple instances playing simultaneously...

Also If I were to drag a song file on to an existing instance the audio will stutter a bunch with a short (less than a second) burst of sound from the new audio track before the Player reverts to playing the originally playing track (from the beginning) instead of the track I dropped on to it.

ValleyBell commented 2 years ago

A "single instance" mode would indeed be a pretty nice feature. (I'm just not sure when I will be able to make it, as it involves inter-process communication.)


When you drop a track into the console window, it simulates you typing its whole path in it. If the path has spaces, it will toggle "pause mode" at these spots. If it has an R in it, the song will reset, etc.

The main problem here is, that the path may start with the drive letter, so implementing a heuristic may be difficult and definitely requires a bit of looking ahead. (fun fact: If you drop Q:\song.vgm into the window, it will close instantly due to the Q drive letter.)