I have been too brain dead for quite a while to put any effort towards this; just worn out. I got at it today, and implemented what seems to be a working "Streaming Flash Music Player". Perhaps it is best called "Compressed Music" but I guess "Streaming Music" has sort of stuck by now, and gives a bit more indication to it's general design. Like I have said before, I did not design this to be optimal for flash based playback which is good at random seeks(like MOD makes excellent use of), more, everything was designed to minimize the worst case scenario that might occur during streaming a song(where many random seeks is simply not feasible), versus the stock MIDI player format. It just so happens, that in all cases I have seen, this format comes out significantly smaller than the stock flash player. It would be possible to develop better compression in the flash case, but MOD has already done that. This should be easy for people to use, since most everyone is using MIDI and songs are generally available in that format(I have not successfully even created a MOD song yet).
So I really hope people will not be to shy to try it in their makefile, to trigger mconvert to do all the things necessary. Essentially, if you are willing to follow the wiki tutorial and build a simple configuration file for your music(and integrate your music conversion into the makefile for easier development). You should be able to save ~30% on flash space, versus anything you were doing with the standard MIDI. I have fixed up the tutorial
here, and if anything doesn't make sense please let me know. I have stepped through the tutorial to build a flash based demo(which is probably redundant to include in the main branch), and that I can see the tutorial is accurate as written. As another nice side benefit, there should be a nice ram savings over the stock MIDI player(do not need loopEnd, nor songStart, so 4 bytes). Not a ton of testing has been done, but I have successfully converted a song to the compressed format, and simply included it in my project. Then the code to play it is....:
That is it, just works like stock without all the complexities in the buffered version
The buffered version remains the same, except that you must now specify:
to specify that you will be using the buffering code(otherwise it will assume flash based). I attempted to do this all as cleanly as possible, considering we now have 3 separate music engines(MIDI,MOD,Streaming ram with it's 2 submodes). So just a brief wait before release here because I want it to be done right and not need fixing...I am finalizing it at the moment and consulting with Jubatian, as he is keen to combine this in the main branch along with his nice improvements to the mixer which should really add up to some nice gains for future games. Stay tuned!