aflibBufferUtils Class Reference

Class that implements a buffer for devices that need one. More...

#include <aflibBufferUtils.h>

List of all members.

Public Member Functions

 aflibBufferUtils ()
 ~aflibBufferUtils ()
bool init (int buf_size)
 Initializes the buffer class.
int getBufferSize () const
 Gets the total size of the buffer.
int bytes_available ()
 Gets the number bytes available to read from the buffer.
void write (unsigned char *buf, int num_bytes)
void read (unsigned char *buf, int num_bytes)


Detailed Description

Class that implements a buffer for devices that need one.

Some audio devices do not provide buffering for audio data. The Solaris audio device in record mode is one. For record mode one must read data in blocks exactly. If the user requests a size different than the audio device block size then we must read the audio device block size and buffer the data and return the requested size from the buffer. This class provides this buffer.


Constructor & Destructor Documentation

aflibBufferUtils::aflibBufferUtils (  ) 

aflibBufferUtils::~aflibBufferUtils (  ) 


Member Function Documentation

bool aflibBufferUtils::init ( int  buf_size  ) 

Initializes the buffer class.

This will initialize the buffer class with a size of buf_size. Subsequent calls to this function will free any previous memory allocated with a call to init.

int aflibBufferUtils::getBufferSize (  )  const [inline]

Gets the total size of the buffer.

int aflibBufferUtils::bytes_available (  )  [inline]

Gets the number bytes available to read from the buffer.

void aflibBufferUtils::write ( unsigned char *  buf,
int  num_bytes 
)

void aflibBufferUtils::read ( unsigned char *  buf,
int  num_bytes 
)


The documentation for this class was generated from the following files:
Generated on Sat Feb 23 13:56:37 2008 for Open Source Audio Library Project by  doxygen 1.5.1