audio get_active()

get_active() returns only 1.

so what im doing, im looping over it, but it never change his state. it doesnt switch to zero when the audio is done?

Hi krid,

the get_active() function tells you only if the audio manager runs and would only change if you stop the manager. So if you want to know when the audio ends, you have to use the status() function.

This is what the header file says to the status and the get_active function:

enum SoundStatus { BAD, READY, PLAYING };
virtual SoundStatus status() const = 0;

// inits to manager's state.
virtual void set_active(bool flag=true) = 0;
virtual bool get_active() const = 0;

hope this helps


yeah, the status function fixed it. thanks alot.

int status = [i]audio[/i]->status();