I came up with a 'solution', but I think it's kind of awkward. I've got something like this.
Code:
class base
{
virtual void update() = 0;
virtual void draw() = 0;
static sound * sounds_array;
};
class loader : public base
{
void update();
void draw();
static FMOD_RESULT F_CALLBACK AsyncOpenCompletion
( FMOD_SOUND * sound, FMOD_RESULT result );
static loader * fake_this;
int completed, percentage_loaded;
};
class game : public base
{
void update();
void draw();
};
I use the fake_this to communicate with the current instance of a loader class while I am inside the callback routine, and also to put the loaded sounds into the static array. I suppose more than one instance of this class will never exist, so I guess it's okay? Then I make the different game states use this sound array. Critiques welcome, anyways I think it'll stay.