cAudio  2.3.0
3d Audio Engine
Public Member Functions | List of all members
cAudio::cRawDecoder Class Reference
Inheritance diagram for cAudio::cRawDecoder:
Inheritance graph
[legend]
Collaboration diagram for cAudio::cRawDecoder:
Collaboration graph
[legend]

Public Member Functions

 cRawDecoder (IDataSource *stream, unsigned int frequency, AudioFormats format)
 
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. More...
 
virtual bool setPosition (int position, bool relative)
 Sets the position in the stream to read from. More...
 
virtual bool seek (float seconds, bool relative)
 If seeking is supported, will seek the stream to seconds. More...
 
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.
 
virtual cAudioString getType () const
 Returns the IAudioDecoderType.
 
- Public Member Functions inherited from cAudio::IAudioDecoder
 IAudioDecoder (IDataSource *stream)
 Default Constructor. More...
 
- Public Member Functions inherited from cAudio::IRefCounted
virtual void grab ()
 Increments the reference count by one.
 
virtual bool drop ()
 Decrements the reference count by one. If it hits zero, this object is deleted.
 
int getReferenceCount () const
 Returns the current reference count of this object.
 
- Public Member Functions inherited from cAudio::cMemoryOverride
void * operator new (size_t size, const char *file, int line, const char *function)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *pointer)
 
void * operator new[] (size_t size, const char *file, int line, const char *function)
 
void * operator new[] (size_t size)
 
void operator delete (void *pointer)
 
void operator delete (void *pointer, void *)
 
void operator delete (void *pointer, const char *, int, const char *)
 
void operator delete[] (void *pointer)
 
void operator delete[] (void *pointer, const char *, int, const char *)
 

Additional Inherited Members

- Protected Attributes inherited from cAudio::IAudioDecoder
IDataSourceStream
 Pointer to the data source to take audio data from.
 
- Protected Attributes inherited from cAudio::IRefCounted
int RefCount
 

Detailed Description

Definition at line 12 of file cRawDecoder.h.

Member Function Documentation

int cAudio::cRawDecoder::readAudioData ( void *  output,
int  amount 
)
virtual

Reads a section of data out of the audio stream.

Parameters
outputPointer to the buffer to put the decoded audio.
amountAmount 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 39 of file cRawDecoder.cpp.

bool cAudio::cRawDecoder::seek ( float  seconds,
bool  relative 
)
virtual

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

Parameters
secondsTime in seconds to seek.
relativeWhether the number in position is relative to the current position.
Returns
True on success, False on failure.

Implements cAudio::IAudioDecoder.

Definition at line 50 of file cRawDecoder.cpp.

bool cAudio::cRawDecoder::setPosition ( int  position,
bool  relative 
)
virtual

Sets the position in the stream to read from.

Parameters
positionPosition to seek to.
relativeWhether the number in position is relative to the current position.
Returns
True on success, False on failure.

Implements cAudio::IAudioDecoder.

Definition at line 44 of file cRawDecoder.cpp.


The documentation for this class was generated from the following files: