audiere::MP3InputStream Class Reference

#include <input_mp3.h>

Inheritance diagram for audiere::MP3InputStream:

Inheritance graph
[legend]
Collaboration diagram for audiere::MP3InputStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MP3InputStream ()
 ~MP3InputStream ()
bool initialize (FilePtr file)
void getFormat (int &channel_count, int &sample_rate, SampleFormat &sample_format)
int doRead (int frame_count, void *samples)
void reset ()
bool isSeekable ()
int getLength ()
void setPosition (int position)
int getPosition ()

Detailed Description

Definition at line 12 of file input_mp3.h.


Constructor & Destructor Documentation

audiere::MP3InputStream::MP3InputStream  ) 
 

Definition at line 16 of file input_mp3.cpp.

References audiere::SF_S16.

audiere::MP3InputStream::~MP3InputStream  ) 
 

Definition at line 36 of file input_mp3.cpp.


Member Function Documentation

int audiere::MP3InputStream::doRead int  frame_count,
void *  samples
[virtual]
 

Implement this method in subclasses.

Implements audiere::BasicSource.

Definition at line 158 of file input_mp3.cpp.

References ADR_GUARD, audiere::GetFrameSize(), and audiere::QueueBuffer::getSize().

void audiere::MP3InputStream::getFormat int &  channel_count,
int &  sample_rate,
SampleFormat sample_format
[virtual]
 

Retrieve the number of channels, sample rate, and sample format of the sample source.

Implements audiere::SampleSource.

Definition at line 146 of file input_mp3.cpp.

int audiere::MP3InputStream::getLength  )  [virtual]
 

Returns:
number of frames in the stream, or 0 if the stream is not seekable

Reimplemented from audiere::BasicSource.

Definition at line 141 of file input_mp3.cpp.

int audiere::MP3InputStream::getPosition  )  [virtual]
 

Returns the current position within the sample source.

Returns:
current position in frames

Reimplemented from audiere::BasicSource.

Definition at line 97 of file input_mp3.cpp.

bool audiere::MP3InputStream::initialize FilePtr  file  ) 
 

Definition at line 46 of file input_mp3.cpp.

References audiere::File::BEGIN, audiere::File::END, and reset().

bool audiere::MP3InputStream::isSeekable  )  [virtual]
 

Returns:
true if the stream is seekable, false otherwise

Reimplemented from audiere::BasicSource.

Definition at line 92 of file input_mp3.cpp.

void audiere::MP3InputStream::reset  )  [virtual]
 

Reset the sample source. This has the same effect as setPosition(0) on a seekable source. On an unseekable source, it resets all internal state to the way it was when the source was first created.

Implements audiere::SampleSource.

Definition at line 197 of file input_mp3.cpp.

References ADR_GUARD, audiere::File::BEGIN, and audiere::QueueBuffer::clear().

Referenced by initialize(), and setPosition().

void audiere::MP3InputStream::setPosition int  position  )  [virtual]
 

Sets the current position within the sample source. If the stream is not seekable, this method does nothing.

Parameters:
position current position in frames

Reimplemented from audiere::BasicSource.

Definition at line 102 of file input_mp3.cpp.

References audiere::File::BEGIN, and reset().


The documentation for this class was generated from the following files:
Generated on Mon Feb 13 23:09:19 2006 for audiere by  doxygen 1.4.6