aflibBufferDev Class Reference

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

#include <aflibBufferDev.h>

List of all members.

Public Member Functions

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.


Member Function Documentation

bool aflibBufferDev::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.


The documentation for this class was generated from the following files:
Generated on Tue Jan 16 12:42:56 2007 for Open Source Audio Library Project by  doxygen 1.4.6