What started off as a small plugin to play music files from an archive, ended up turning into something a little more useful.
I’ve used plugins in winamp before to accomplish this, but they all did the same thing, extract the archive to a temporary folder and then play the file, so it wasn’t really what I wanted, and there was always that delay in playing the track or displaying the track title as the files were getting extracted.
So I put together a small winamp plugin that tried to steam the files directly from the archive, titles listed and playback is almost instant!
I then noticed, it could do with a few other features, like archive types, password protected archives, multi-part archives, and media types etc..
Learning a bit more about RAR/Zip and 7zip archive types while adding this functionality, there are some restrictions on streaming, like with solid archives, meaning you need to read the archive from the start, even if you only want to access the last file. Streaming in this case would be pointless, if you then decided to play the second last file, again it reads from the start, so I decided to implant a 3 step rule for all archives and players!
Stream first, if streaming is possible, then we don’t need the other 2 steps.
Memory second, if the file cannot be streamed, will it fit into our memory buffer? If so, read it into the buffer and stream from there.
Cache, this is the last resort, and most undesired but fallback step, and only comes into effect if the archive cannot stream, but also if the memory buffer is too small for the file. The files stay in cache though, until cleaned up (plugin settings). So if you play the file again, it will check the cache first to see if we already have it available to play right away, then in the background it will load the other files in the archive.
There are a few more bits and bobs in the background, but the overall idea is playing tracks from archives.
Lately though, I thought I’d add in other player support encase I or others wanted to use other players.
The plugin is meant to be as inclusive/standalone as possible, not relying on external dll’s or libraries etc, and does most of its own work, some of the later players have bridging instead of decoders etc, and this may change later on.
The current list of plays are
MusicBee
MediaMonkey
VLC
Windows Media Player
Winamp
Foobar2000
AIMP
XMPlay
WACUP
Anyway, hope you find it useful, if so, drop me a message or report any issues on GitHub.