cAudio::cWavDecoder Class Reference

Inheritance diagram for cAudio::cWavDecoder:
Inheritance graph
[legend]
Collaboration diagram for cAudio::cWavDecoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 cWavDecoder (IDataSource *stream)
virtual AudioFormats getFormat ()
 Returns the format of the audio data.
virtual int getFrequency ()
 Returns the frequency (sample rate) of the audio data.
virtual bool isSeekingSupported ()
 Returns whether seeking is supported.
virtual bool isValid ()
 Returns whether the stream is valid for this codec.
virtual int readAudioData (void *output, int amount)
 Reads a section of data out of the audio stream.
virtual bool setPosition (int position, bool relative)
 Sets the position in the stream to read from.
virtual bool seek (float seconds, bool relative)
 If seeking is supported, will seek the stream to seconds.
virtual float getTotalTime ()
 If seeking is supported, will return the length of the audio steam in seconds. Returns a negative number if the total time cannot be determined.
virtual int getTotalSize ()
 If available, returns the total decoded size of the audio stream. Returns a negative number if this cannot be determined.
virtual int getCompressedSize ()
 Returns the compressed (original) size of the audio stream, before decoding.
virtual float getCurrentTime ()
 If seeking is supported, will return the current position in the stream in seconds. Returns a negative number if the current time cannot be determined.
virtual int getCurrentPosition ()
 If available, returns the current position in the decoded audio stream in bytes. Returns a negative number if this cannot be determined.
virtual int getCurrentCompressedPosition ()
 Returns the position in the compressed (original) audio stream before decoding.

Detailed Description

Definition at line 15 of file cWavDecoder.h.


Member Function Documentation

int cAudio::cWavDecoder::readAudioData ( void *  output,
int  amount 
) [virtual]

Reads a section of data out of the audio stream.

Parameters:
output,: Pointer to the buffer to put the decoded audio.
amount,: Amount of data in bytes to ask the decoder to output.
Returns:
Number of bytes of audio data actually output.

Implements cAudio::IAudioDecoder.

Definition at line 146 of file cWavDecoder.cpp.

bool cAudio::cWavDecoder::seek ( float  seconds,
bool  relative 
) [virtual]

If seeking is supported, will seek the stream to seconds.

Parameters:
seconds,: Time in seconds to seek.
relative,: Whether the number in position is relative to the current position.
Returns:
True on success, False on failure.

Implements cAudio::IAudioDecoder.

Definition at line 193 of file cWavDecoder.cpp.

bool cAudio::cWavDecoder::setPosition ( int  position,
bool  relative 
) [virtual]

Sets the position in the stream to read from.

Parameters:
position,: Position to seek to.
relative,: Whether the number in position is relative to the current position.
Returns:
True on success, False on failure.

Implements cAudio::IAudioDecoder.

Definition at line 173 of file cWavDecoder.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations

Generated on Sat Feb 20 22:55:38 2010 for cAudio by  doxygen 1.6.2