AmAudioQueue Class Reference

Holds AmAudios and reads/writes through all. More...

#include <AmAdvancedAudio.h>

Inheritance diagram for AmAudioQueue:

AmAudio

Public Types

enum  QueueType { OutputQueue, InputQueue }
enum  Pos { Front, Back }

Public Member Functions

void pushAudio (AmAudio *audio, QueueType type, Pos pos, bool write, bool read)
int popAudio (QueueType type, Pos pos)
AmAudiopopAndGetAudio (QueueType type, Pos pos)
int removeAudio (AmAudio *audio)

Protected Member Functions

int write (unsigned int user_ts, unsigned int size)
int read (unsigned int user_ts, unsigned int size)

Detailed Description

Holds AmAudios and reads/writes through all.

AmAudioQueue can hold AmAudios in input and output queue. Audio will be read through the whole output queue, and written through the whole input queue.


Member Function Documentation

void AmAudioQueue::pushAudio ( AmAudio audio,
QueueType  type,
Pos  pos,
bool  write,
bool  read 
)

add an audio to a queue

int AmAudioQueue::popAudio ( QueueType  type,
Pos  pos 
)

pop an audio from queue and delete it

Returns:
0 on success, -1 on failure

AmAudio * AmAudioQueue::popAndGetAudio ( QueueType  type,
Pos  pos 
)

pop an audio from queue

Returns:
pointer to the audio

int AmAudioQueue::removeAudio ( AmAudio audio  ) 

this removes the audio if it is in on of the queues and does not delete them

int AmAudioQueue::write ( unsigned int  user_ts,
unsigned int  size 
) [protected, virtual]

Puts 'size' bytes directly from stream (Write,Push).

Implements AmAudio.

int AmAudioQueue::read ( unsigned int  user_ts,
unsigned int  size 
) [protected, virtual]

Gets 'size' bytes directly from stream (Read,Pull).

Implements AmAudio.


The documentation for this class was generated from the following files:
Generated on Fri May 16 12:02:06 2008 for SEMS by  doxygen 1.5.1
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login