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

aflibAudioFile Class Reference

Wrapper class that allows aflibFile object to be used in a chain. More...

#include <aflibAudioFile.h>

Inheritance diagram for aflibAudioFile::

aflibAudio aflibChain aflibMemCache List of all members.

Public Methods

 aflibAudioFile (aflibFileType type_enum, const string &file, aflibConfig *cfg=NULL, aflibStatus *status=NULL)
 Constructor used to read a device or file.

 aflibAudioFile (const string &format, const string &file, aflibConfig *cfg=NULL, aflibStatus *status=NULL)
 Constructor used to read a device or file.

 aflibAudioFile (aflibAudio &audio, aflibFileType type_enum, const string &file, aflibConfig *cfg=NULL, aflibStatus *status=NULL)
 Constructor used to write to a device or file.

 aflibAudioFile (aflibAudio &audio, const string &format, const string &file, aflibConfig *cfg=NULL, aflibStatus *status=NULL)
 Constructor used to write to a device or file.

 ~aflibAudioFile ()
 Destructor.

aflibStatus compute_segment (list< aflibData *> &data, long long position=-1)
 Work function, must be implemented by derived class.

bool setItem (const char *item, const void *value)
bool getItem (const char *item, void *value)
const char* getName () const
 Returns the name of the derived class.

void setInputConfig (const aflibConfig &cfg)
 Sets the input audio data configuration of an object. More...

const aflibConfiggetInputConfig () const
 Returns the input audio data configuration of an object.

void setOutputConfig (const aflibConfig &cfg)
 Sets the output audio data configuration of an object. More...

const aflibConfiggetOutputConfig () const
 Returns the output audio data configuration of an object.

const string& getFormat () const
 Gets the format of the audio file. More...

bool isDataSizeSupported (aflib_data_size size)
bool isEndianSupported (aflib_data_endian end)
bool isSampleRateSupported (int &rate)
bool isChannelsSupported (int &channels)

Detailed Description

Wrapper class that allows aflibFile object to be used in a chain.

This class is the object wrapper that can make an aflibFile object useable as an audio object and to be used in a chain. For using file and device objects in a chain this is the API that one should use. The constructors are the same as the base class.

Function compute_segment is implemented so that the base aflibAudio class can process data throught this class.

There are three constructors with this class. One with no aflibAudio parent and the other two with parents. When starting a chain with an audio source the constructor without a parent should be used. When at the end of a chain one of the two constructors that require an audio aflibAudio object should be used.


Constructor & Destructor Documentation

aflibAudioFile::aflibAudioFile ( aflibFileType type_enum,
const string & file,
aflibConfig * cfg = NULL,
aflibStatus * status = NULL )
 

Constructor used to read a device or file.

aflibAudioFile::aflibAudioFile ( const string & format,
const string & file,
aflibConfig * cfg = NULL,
aflibStatus * status = NULL )
 

Constructor used to read a device or file.

aflibAudioFile::aflibAudioFile ( aflibAudio & audio,
aflibFileType type_enum,
const string & file,
aflibConfig * cfg = NULL,
aflibStatus * status = NULL )
 

Constructor used to write to a device or file.

aflibAudioFile::aflibAudioFile ( aflibAudio & audio,
const string & format,
const string & file,
aflibConfig * cfg = NULL,
aflibStatus * status = NULL )
 

Constructor used to write to a device or file.

aflibAudioFile::~aflibAudioFile ( )
 

Destructor.


Member Function Documentation

aflibStatus aflibAudioFile::compute_segment ( list< aflibData *> & data,
long long position = -1 ) [virtual]
 

Work function, must be implemented by derived class.

Reimplemented from aflibAudio.

const string & aflibAudioFile::getFormat ( ) const
 

Gets the format of the audio file.

This will retrieve the format of the current file being written to. This is usefull when reading a file in AUTO mode. This will tel you the format that is being used.

const aflibConfig& aflibAudioFile::getInputConfig ( ) const [virtual]
 

Returns the input audio data configuration of an object.

Reimplemented from aflibAudio.

bool aflibAudioFile::getItem ( const char * item,
void * value )
 

const char * aflibAudioFile::getName ( ) const [inline, virtual]
 

Returns the name of the derived class.

Reimplemented from aflibAudio.

const aflibConfig& aflibAudioFile::getOutputConfig ( ) const [virtual]
 

Returns the output audio data configuration of an object.

Reimplemented from aflibAudio.

bool aflibAudioFile::isChannelsSupported ( int & channels ) [virtual]
 

Reimplemented from aflibAudio.

bool aflibAudioFile::isDataSizeSupported ( aflib_data_size size ) [virtual]
 

Reimplemented from aflibAudio.

bool aflibAudioFile::isEndianSupported ( aflib_data_endian end ) [virtual]
 

Reimplemented from aflibAudio.

bool aflibAudioFile::isSampleRateSupported ( int & rate ) [virtual]
 

Reimplemented from aflibAudio.

void aflibAudioFile::setInputConfig ( const aflibConfig & cfg ) [virtual]
 

Sets the input audio data configuration of an object.

This is a virtual function that derived classes can override if needed. It allows the caller to set the configuration of the audio data of an object. By default it saves the output audio configuration to be the same as the input data configuration that is passed in. This should be sufficient for most derived classes. For those classes that will have a change from the output to input config mapping then this function should be overriden and the output config processed and saved.

Reimplemented from aflibAudio.

bool aflibAudioFile::setItem ( const char * item,
const void * value )
 

void aflibAudioFile::setOutputConfig ( const aflibConfig & cfg ) [virtual]
 

Sets the output audio data configuration of an object.

This is a virtual function that derived classes can override if needed. Most derived classes will not need to override this function but can simply call it to store the output audio configuration. It is virtual so that it can be overriden by the aflibAudioFile class which needs to implement its own.

Reimplemented from aflibAudio.


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