Planeshift
SoundQueue Class Reference

Used to put Sounds in a Queue and play them in the order they have been added. More...

#include <queue.h>

Public Member Functions

void AddItem (const char *filename)
 Used to create a new. More...
 
void AddItem (const char *filename)
 Used to create a new. More...
 
void DeleteItem (SoundQueueItem *&item)
 Used to remove a. More...
 
void DeleteItem (SoundQueueItem *&item)
 Used to remove a. More...
 
size_t GetSize ()
 Returns elements still in the queue to be played. More...
 
size_t GetSize ()
 Returns elements still in the queue to be played. More...
 
void Purge ()
 Stops playback and purges all SoundQueueItem(s). More...
 
void Purge ()
 Stops playback and purges all SoundQueueItem(s). More...
 
 SoundQueue (SoundControl *&ctrl, float vol)
 Constructor. More...
 
 SoundQueue (SoundControl *&ctrl, float vol)
 Constructor. More...
 
void Work ()
 Checks if there are queued items which can be played. More...
 
void Work ()
 Checks if there are queued items which can be played. More...
 
 ~SoundQueue ()
 Destructor. More...
 
 ~SoundQueue ()
 Destructor. More...
 

Detailed Description

Used to put Sounds in a Queue and play them in the order they have been added.

Definition at line 61 of file queue.h.

Constructor & Destructor Documentation

SoundQueue::SoundQueue ( SoundControl *&  ctrl,
float  vol 
)

Constructor.

Parameters
ctrla valid SoundControl
volvolume as float
SoundQueue::~SoundQueue ( )

Destructor.

SoundQueue::SoundQueue ( SoundControl *&  ctrl,
float  vol 
)

Constructor.

Parameters
ctrla valid SoundControl
volvolume as float
SoundQueue::~SoundQueue ( )

Destructor.

Member Function Documentation

void SoundQueue::AddItem ( const char *  filename)

Used to create a new.

See also
SoundQueueItem. Will create a new
SoundQueueItem and adds it to the Queue
Parameters
filenamea unique (not enforced) filename
void SoundQueue::AddItem ( const char *  filename)

Used to create a new.

See also
SoundQueueItem. Will create a new
SoundQueueItem and adds it to the Queue
Parameters
filenamea unique (not enforced) filename
void SoundQueue::DeleteItem ( SoundQueueItem *&  item)

Used to remove a.

See also
SoundQueueItem from the Queue. Will remove that
SoundQueueItem and deletes it from the Queue.
Parameters
itema valid SoundQueueItem
void SoundQueue::DeleteItem ( SoundQueueItem *&  item)

Used to remove a.

See also
SoundQueueItem from the Queue. Will remove that
SoundQueueItem and deletes it from the Queue.
Parameters
itema valid SoundQueueItem
size_t SoundQueue::GetSize ( )

Returns elements still in the queue to be played.

Returns
The amount of elements still to be played which are in the queue.
size_t SoundQueue::GetSize ( )

Returns elements still in the queue to be played.

Returns
The amount of elements still to be played which are in the queue.
void SoundQueue::Purge ( )

Stops playback and purges all SoundQueueItem(s).

void SoundQueue::Purge ( )

Stops playback and purges all SoundQueueItem(s).

void SoundQueue::Work ( )

Checks if there are queued items which can be played.

Walks over

See also
queue and checks if there are items to play or to delete. Faulty Items will be removed.
void SoundQueue::Work ( )

Checks if there are queued items which can be played.

Walks over

See also
queue and checks if there are items to play or to delete. Faulty Items will be removed.

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