Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

aflibBufferUtils Class Reference

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

#include <aflibBufferUtils.h>

List of all members.

Public Methods

 aflibBufferUtils ()
 ~aflibBufferUtils ()
bool init (int buf_size)
 Initializes the buffer class. More...

int getBufferSize () const
 Gets the total size of the buffer. More...

int bytes_available ()
 Gets the number bytes available to read from the buffer. More...

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

int aflibBufferUtils::bytes_available   [inline]
 

Gets the number bytes available to read from the buffer.

int aflibBufferUtils::getBufferSize   const [inline]
 

Gets the total size of the buffer.

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.

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

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


The documentation for this class was generated from the following files:
Generated on Wed May 8 20:51:10 2002 for Open Source Audio Library Project by doxygen1.2.15