14 #ifndef MP_AUDIO_ABSTRACT_H 15 #define MP_AUDIO_ABSTRACT_H 18 #include <os/iostream> 26 #define AUDIO_FORMAT_UNKNOWN 0 27 #define AUDIO_FORMAT_WAV 1 28 #define AUDIO_FORMAT_AU 2 Definition: MpAudioAbstract.h:30
virtual void setAudioFormat(int type)
Set audio object format.
Definition: MpAudioAbstract.h:126
virtual size_t getSamples(AudioSample *, size_t)=0
Returns number of samples actually read, 0 on error.
virtual void negotiateSamplingRate(void)
negotiate the sampling rate
Definition: MpAudioAbstract.cpp:114
bool mSamplingRateFrozen
Definition: MpAudioAbstract.h:144
virtual size_t getBytesSize()
get bytes size of the audio file
Definition: MpAudioAbstract.cpp:51
virtual int getAudioFormat()
Get audio object format.
Definition: MpAudioAbstract.h:129
virtual void setChannelsRecursive(int s)
Set channel recusively.
Definition: MpAudioAbstract.cpp:146
virtual void minMaxChannels(int *min, int *max, int *preferred)
Get prefered channel.
Definition: MpAudioAbstract.cpp:154
int mDetectedFormat
Definition: MpAudioAbstract.h:150
MpAudioAbstract(void)
Default Constructor.
Definition: MpAudioAbstract.cpp:19
virtual ~MpAudioAbstract()
Destructor.
Definition: MpAudioAbstract.cpp:38
bool isOk()
Return true if file loaded ok.
Definition: MpAudioAbstract.h:132
virtual int getDecompressionType()
get decompression type of the audio file
Definition: MpAudioAbstract.cpp:56
void setNextAudio(MpAudioAbstract *a)
set next audio to a
Definition: MpAudioAbstract.cpp:81
virtual void minMaxSamplingRate(long *min, long *max, long *prefer)
TODO: the meaning of this function, get the prefered Sampling rate.
Definition: MpAudioAbstract.cpp:105
long mSamplingRate
Definition: MpAudioAbstract.h:143
virtual void setChannels(int ch)
Set channel to ch.
Definition: MpAudioAbstract.cpp:137
virtual void negotiateChannels(void)
negotiate channel
Definition: MpAudioAbstract.cpp:163
virtual size_t readBytes(AudioByte *buff, size_t length)
read length of bytes
Definition: MpAudioAbstract.cpp:46
MpAudioAbstract * getNextAudio(void)
get next audio
Definition: MpAudioAbstract.cpp:75
long mChannels
Definition: MpAudioAbstract.h:147
bool mbIsOk
If file loaded ok.
Definition: MpAudioAbstract.h:153
virtual void setSamplingRate(long s)
Set the sampling rate to s.
Definition: MpAudioAbstract.cpp:88
unsigned char AudioByte
Definition: MpAudioAbstract.h:22
MpAudioAbstract * getPreviousAudio(void)
get previous audio
Definition: MpAudioAbstract.cpp:63
short AudioSample
Definition: MpAudioAbstract.h:21
MpAudioAbstract * mNext
object pulling data from us
Definition: MpAudioAbstract.h:140
MpAudioAbstract * mPrevious
object to get data from
Definition: MpAudioAbstract.h:139
virtual void setSamplingRateRecursive(long s)
Set sampling rate recursively.
Definition: MpAudioAbstract.cpp:97
bool mChannelsFrozen
Definition: MpAudioAbstract.h:148
virtual long getSamplingRate(void)
Return the sampling rate.
Definition: MpAudioAbstract.cpp:128
virtual int getChannels(void)
Return the channels.
Definition: MpAudioAbstract.cpp:178
void setPreviousAudio(MpAudioAbstract *a)
set previous audio to a
Definition: MpAudioAbstract.cpp:69