sipxmedialib  Version 3.3
Protected Attributes | Private Attributes | List of all members
MpAudioAbstract Class Referenceabstract

#include <MpAudioAbstract.h>

Inheritance diagram for MpAudioAbstract:
Inheritance graph
[legend]
Collaboration diagram for MpAudioAbstract:
Collaboration graph
[legend]

Public Member Functions

Creators
 MpAudioAbstract (void)
 Default Constructor. More...
 
 MpAudioAbstract (MpAudioAbstract *audio)
 Copy Constructor. More...
 
virtual ~MpAudioAbstract ()
 Destructor. More...
 
Non classfied
virtual size_t getSamples (AudioSample *, size_t)=0
 Returns number of samples actually read, 0 on error. More...
 
virtual size_t readBytes (AudioByte *buff, size_t length)
 read length of bytes More...
 
virtual size_t getBytesSize ()
 get bytes size of the audio file More...
 
virtual int getDecompressionType ()
 get decompression type of the audio file More...
 
MpAudioAbstract related operations
MpAudioAbstractgetPreviousAudio (void)
 get previous audio More...
 
void setPreviousAudio (MpAudioAbstract *a)
 set previous audio to a More...
 
MpAudioAbstractgetNextAudio (void)
 get next audio More...
 
void setNextAudio (MpAudioAbstract *a)
 set next audio to a More...
 
Sample related functions
virtual void setSamplingRate (long s)
 Set the sampling rate to s. More...
 
virtual void setSamplingRateRecursive (long s)
 Set sampling rate recursively. More...
 
virtual void minMaxSamplingRate (long *min, long *max, long *prefer)
 TODO: the meaning of this function, get the prefered Sampling rate. More...
 
virtual void negotiateSamplingRate (void)
 negotiate the sampling rate More...
 
virtual long getSamplingRate (void)
 Return the sampling rate. More...
 
Channel related functions
virtual void setChannels (int ch)
 Set channel to ch. More...
 
virtual void setChannelsRecursive (int s)
 Set channel recusively. More...
 
virtual void minMaxChannels (int *min, int *max, int *preferred)
 Get prefered channel. More...
 
virtual void negotiateChannels (void)
 negotiate channel More...
 
virtual int getChannels (void)
 Return the channels. More...
 
virtual void setAudioFormat (int type)
 Set audio object format. More...
 
virtual int getAudioFormat ()
 Get audio object format. More...
 
bool isOk ()
 Return true if file loaded ok. More...
 

Protected Attributes

bool mbIsOk
 If file loaded ok. More...
 

Private Attributes

MpAudioAbstractmPrevious
 object to get data from More...
 
MpAudioAbstractmNext
 object pulling data from us More...
 
long mSamplingRate
 
bool mSamplingRateFrozen
 
long mChannels
 
bool mChannelsFrozen
 
int mDetectedFormat
 

Constructor & Destructor Documentation

MpAudioAbstract ( void  )

Default Constructor.

Copy Constructor.

~MpAudioAbstract ( )
virtual

Destructor.

Member Function Documentation

virtual size_t getSamples ( AudioSample ,
size_t   
)
pure virtual

Returns number of samples actually read, 0 on error.

Implemented in MpAudioWaveFileRead, and MpAuRead.

size_t readBytes ( AudioByte buff,
size_t  length 
)
virtual

read length of bytes

Reimplemented in MpAudioWaveFileRead, and MpAuRead.

size_t getBytesSize ( )
virtual

get bytes size of the audio file

Reimplemented in MpAudioWaveFileRead, and MpAuRead.

int getDecompressionType ( )
virtual

get decompression type of the audio file

Reimplemented in MpAudioWaveFileRead, and MpAuRead.

MpAudioAbstract * getPreviousAudio ( void  )

get previous audio

void setPreviousAudio ( MpAudioAbstract a)

set previous audio to a

MpAudioAbstract * getNextAudio ( void  )

get next audio

void setNextAudio ( MpAudioAbstract a)

set next audio to a

void setSamplingRate ( long  s)
virtual

Set the sampling rate to s.

void setSamplingRateRecursive ( long  s)
virtual

Set sampling rate recursively.

void minMaxSamplingRate ( long *  min,
long *  max,
long *  prefer 
)
virtual

TODO: the meaning of this function, get the prefered Sampling rate.

Reimplemented in MpAudioWaveFileRead, and MpAuRead.

void negotiateSamplingRate ( void  )
virtual

negotiate the sampling rate

long getSamplingRate ( void  )
virtual

Return the sampling rate.

void setChannels ( int  ch)
virtual

Set channel to ch.

void setChannelsRecursive ( int  s)
virtual

Set channel recusively.

void minMaxChannels ( int *  min,
int *  max,
int *  preferred 
)
virtual

Get prefered channel.

Reimplemented in MpAuRead, and MpAudioWaveFileRead.

void negotiateChannels ( void  )
virtual

negotiate channel

int getChannels ( void  )
virtual

Return the channels.

virtual void setAudioFormat ( int  type)
inlinevirtual

Set audio object format.

virtual int getAudioFormat ( )
inlinevirtual

Get audio object format.

bool isOk ( )
inline

Return true if file loaded ok.

Member Data Documentation

MpAudioAbstract* mPrevious
private

object to get data from

MpAudioAbstract* mNext
private

object pulling data from us

long mSamplingRate
private
bool mSamplingRateFrozen
private
long mChannels
private
bool mChannelsFrozen
private
int mDetectedFormat
private
bool mbIsOk
protected

If file loaded ok.