audiere::SpeexInputStream Class Reference

#include <input_speex.h>

Inheritance diagram for audiere::SpeexInputStream:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Detailed Description

Definition at line 15 of file input_speex.h.


Constructor & Destructor Documentation

audiere::SpeexInputStream::SpeexInputStream  ) 
 

Definition at line 47 of file input_speex.cpp.

audiere::SpeexInputStream::~SpeexInputStream  ) 
 

Definition at line 53 of file input_speex.cpp.


Member Function Documentation

int audiere::SpeexInputStream::doRead int  frame_count,
void *  buffer
[virtual]
 

Implement this method in subclasses.

Implements audiere::BasicSource.

Definition at line 108 of file input_speex.cpp.

References ADR_ASSERT, audiere::QueueBuffer::getSize(), audiere::QueueBuffer::read(), and audiere::QueueBuffer::write().

void audiere::SpeexInputStream::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 96 of file input_speex.cpp.

References audiere::SF_S16.

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

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

Reimplemented from audiere::BasicSource.

Definition at line 157 of file input_speex.cpp.

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

Returns the current position within the sample source.

Returns:
current position in frames

Reimplemented from audiere::BasicSource.

Definition at line 170 of file input_speex.cpp.

bool audiere::SpeexInputStream::initialize FilePtr  file  ) 
 

Todo:
this really should be replaced with a factory function

Definition at line 60 of file input_speex.cpp.

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

Returns:
true if the stream is seekable, false otherwise

Reimplemented from audiere::BasicSource.

Definition at line 151 of file input_speex.cpp.

void audiere::SpeexInputStream::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 145 of file input_speex.cpp.

References setPosition().

void audiere::SpeexInputStream::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 163 of file input_speex.cpp.

Referenced by reset().


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