Breakpoint demolog, day 22: voices, parameters...

Began work on getting audio from more than one voice at the same time -- by calling the SorolletPlayer::getBuffer function for the first time! The problem is that currently the body of the method is this:

void SorolletPlayer::getBuffer(float *outL, float *outR, int numSamples)


A tad too simple for my purposes, but had to sort a few things before calling the Voice instances -- such as for example creating those instances first! And sending them the parameters, as read from Song.xml.

It seems that it is working; at least I'm not getting a dreaded segmentation fault on load time. Although no sound yet (for reasons mentioned above ;)) Hopefully tomorrow...

I have also been researching a bit more on the unzip issue. Turns out there are two main options, which are to use zlib, or to use libraries which provide an easier access (or rather nicer interface) to zlib. I am slightly bemused that there's not a simple function/library somewhere out there that can perform decompression in a portable, simple way. And with that I mean something that can be embedded in my code, TinyXML style, without having to build a .a or .lib first and then linking it, or having to install libraryname, and libraryname-dev prior to linking it with my executable, or having to carry a .dll or .so around, which frankly I dislike.

So maybe I'll just add another step in the build process which picks the song, decompresses it and moves the Song.xml file to the data/ folder in the demo. Ah, the joys of having a decent command line!

(Deep down, I am pretty sure there's a nifty library for unzipping files which has been implemented by some anonymous and hard-working 13-years old Japanese guy, and has even bindings for ruby just in case you're not happy with the defaults, but I can't find it because he doesn't speak English and I don't speak Japanese either).

Today's output is pretty much like yesterday's... Stay tuned! ;)