Logo Search packages:      
Sourcecode: akode version File versions  Download package

aKode::AudioBuffer Class Reference

#include <audiobuffer.h>

List of all members.

Detailed Description

A reentrant circular buffer of AudioFrames.

A buffer of AudioFrame to synchronize audio between two threads, one putting and one getting.

Definition at line 36 of file audiobuffer.h.

Public Member Functions

 AudioBuffer (unsigned int len)
bool empty ()
bool eof ()
void flush ()
bool full ()
bool get (AudioFrame *buf, bool blocking=false)
void pause ()
long position ()
bool put (AudioFrame *buf, bool blocking=false)
void release ()
void reset ()
void resume ()
void setEOF ()

Private Member Functions

void takeover (AudioFrame *toFrame, AudioFrame *fromFrame)

Private Attributes

volatile bool flushed
const unsigned int length
volatile bool m_eof
pthread_mutex_t mutex
pthread_cond_t not_empty
pthread_cond_t not_full
volatile bool paused
volatile unsigned int readPos
volatile bool released
volatile unsigned int writePos

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

Generated by  Doxygen 1.6.0   Back to index