34 StreamTask(
const char *pszName,
const char *pszDirectory);
66 std::unique_ptr<StreamPlayer> mPlayer;
68 const char *mDirectory;
Stream of sound data read from a file and handed to the sound output a run at a time.
Definition streamplayer.h:13
void OnStop() override
Stop the stream and release it.
void OnStart() override
Open the stream file and give it to the sound output to play.
void SetWaitingTask(Task *pTask)
Set the task that learns when the stream is done.
StreamTask(const char *pszName, const char *pszDirectory)
Construct a task for a stream file.
StreamPlayer * GetPlayer() const
Definition streamtask.h:60
void OnPoll() override
Once the stream has ended, release it, finish the task, and report to the waiting task.
const char * GetName() const
Definition streamtask.h:55
~StreamTask() override=default
Destroy the object.
void SetPaused(bool bPaused)
Pause or resume the stream.
Unit of work an owner starts, polls until it reports that it is done, and stops.
Definition task.h:9
Task()
Construct an idle task.
Definition task.h:24