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

aflibBufferDev Class Reference

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

#include <aflibBufferDev.h>

List of all members.

Public Methods

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

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

aflibBufferDev::aflibBufferDev ( )
 

aflibBufferDev::~aflibBufferDev ( )
 


Member Function Documentation

int aflibBufferDev::bytes_available ( ) [inline]
 

Gets the number bytes available to read from the buffer.

int aflibBufferDev::getBufferSize ( ) const [inline]
 

Gets the total size of the buffer.

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.

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

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


The documentation for this class was generated from the following files:
Generated at Tue Aug 7 22:18:07 2001 for Open Source Audio Library Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001