OPAL  Version 3.14.3
IAX2SoundList Class Reference

#include <sound.h>

Inherits PBYTEArray.

Public Member Functions

 ~IAX2SoundList ()
 
void Initialise ()
 
PBYTEArray * GetLastEntry ()
 
void AddNewEntry (PBYTEArray *newEntry)
 
void GetAllDeleteAll (IAX2SoundList &dest)
 
PINDEX GetSize ()
 

Protected Attributes

PMutex mutex
 

Detailed Description

The soundlist is a list of PBYTEArray pointers, which are the medium of data exchange with the play/record devices.

New sound blocks are added to the beginning of the list.

Old sound blocks are removed from the end of the list.

The IAX2SoundList is a thread safe storage of PBYTEArray structures.

Constructor & Destructor Documentation

IAX2SoundList::~IAX2SoundList ( )

Destructor, which deletes all sound packets on this list

Member Function Documentation

void IAX2SoundList::AddNewEntry ( PBYTEArray *  newEntry)

Place a new data block at the beginning of the last.

void IAX2SoundList::GetAllDeleteAll ( IAX2SoundList dest)

Return a copy of all entries, and purge list

PBYTEArray* IAX2SoundList::GetLastEntry ( )

Return a pointer to the last element on the list. This will remove this element from the list. Returns NULL if the list is empty

PINDEX IAX2SoundList::GetSize ( )
inline

Thread safe read of the size of the list

References mutex.

void IAX2SoundList::Initialise ( )
inline

Removing item from list will not automatically delete it

Field Documentation

PMutex IAX2SoundList::mutex
protected

Mutex to give thread safety.

Referenced by GetSize().


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