wavelength 1.0.0
Loading...
Searching...
No Matches
StreamQueue Class Reference

Queue of narration streams that plays one stream at a time. More...

#include <streamqueue.h>

Inheritance diagram for StreamQueue:
Collaboration diagram for StreamQueue:

Public Member Functions

 ~StreamQueue () override
 Release the queue and every stream in it.
void Stop ()
 Stop the stream at the head of the queue.
void Enqueue (const char *pszName, bool bSkipIfBusy)
 Append a stream to the queue.
void Poll ()
 Poll the stream at the head, and start the next one when the head is done.
void SetPaused (bool bPaused)
 Pause or resume the stream at the head.
void NotifyWhenDone (Task *pTask, const char *pszName) override
 Arrange for a task to learn when the named stream is done.
const std::vector< std::unique_ptr< StreamTask > > & GetStreams () const
void SetDirectory (const char *pszDirectory)
 Set the directory the stream files are read from.
const String & GetDirectory () const
Public Member Functions inherited from TaskDoneNotifier
virtual ~TaskDoneNotifier ()
 Release the notifier.

Additional Inherited Members

Static Public Member Functions inherited from TaskDoneNotifier
static void ReportDone (Task *pTask)
 Tell a waiting task that its work is done.

Detailed Description

Queue of narration streams that plays one stream at a time.

The RTTI includes the class name and records TaskDoneNotifier as the base. The constructor has no out-of-line copy.

Constructor & Destructor Documentation

◆ ~StreamQueue()

StreamQueue::~StreamQueue ( )
override

Release the queue and every stream in it.

Ghidra address:
NTSC-U/C: 0x00141238
Ghidra address:
PAL: 0x00142bf8

Member Function Documentation

◆ Stop()

void StreamQueue::Stop ( )

Stop the stream at the head of the queue.

Ghidra address:
NTSC-U/C: 0x00141318
Ghidra address:
PAL: 0x00142cd8

◆ Enqueue()

void StreamQueue::Enqueue ( const char * pszName,
bool bSkipIfBusy )

Append a stream to the queue.

Parameters
pszNameThe stream name.
bSkipIfBusyDrop the request when a stream is already queued.
Ghidra address:
NTSC-U/C: 0x00141348
Ghidra address:
PAL: 0x00142d08

◆ Poll()

void StreamQueue::Poll ( )

Poll the stream at the head, and start the next one when the head is done.

Ghidra address:
NTSC-U/C: 0x00141510
Ghidra address:
PAL: 0x00142ed0

◆ SetPaused()

void StreamQueue::SetPaused ( bool bPaused)

Pause or resume the stream at the head.

Parameters
bPausedPause the stream.
Ghidra address:
NTSC-U/C: 0x001415e0
Ghidra address:
PAL: 0x00142fa0

◆ NotifyWhenDone()

void StreamQueue::NotifyWhenDone ( Task * pTask,
const char * pszName )
overridevirtual

Arrange for a task to learn when the named stream is done.

Parameters
pTaskThe task waiting for the stream.
pszNameThe stream name.
Ghidra address:
NTSC-U/C: 0x00141618
Ghidra address:
PAL: 0x00142fd8

Implements TaskDoneNotifier.

◆ GetStreams()

const std::vector< std::unique_ptr< StreamTask > > & StreamQueue::GetStreams ( ) const
inline
Returns
The queued streams, the playing one first.

◆ SetDirectory()

void StreamQueue::SetDirectory ( const char * pszDirectory)
inline

Set the directory the stream files are read from.

Parameters
pszDirectoryThe directory.

◆ GetDirectory()

const String & StreamQueue::GetDirectory ( ) const
inline
Returns
The directory the stream files are read from.

The documentation for this class was generated from the following file: