Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

audiere::Resampler Class Reference

#include <resampler.h>

Inheritance diagram for audiere::Resampler:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 Resampler (SampleSource *source, int rate)
void ADR_CALL getFormat (int &channel_count, int &sample_rate, SampleFormat &sample_format)
int ADR_CALL read (int frame_count, void *buffer)
void ADR_CALL reset ()
bool ADR_CALL isSeekable ()
int ADR_CALL getLength ()
void ADR_CALL setPosition (int position)
int ADR_CALL getPosition ()
void setPitchShift (float shift)
float getPitchShift ()

Constructor & Destructor Documentation

audiere::Resampler::Resampler SampleSource   source,
int    rate
 

Definition at line 6 of file resampler.cpp.


Member Function Documentation

void audiere::Resampler::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 21 of file resampler.cpp.

References audiere::hidden::sample_format, audiere::SampleFormat, and audiere::SF_S16.

int audiere::Resampler::getLength   [virtual]
 

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

Implements audiere::SampleSource.

Definition at line 154 of file resampler.cpp.

float audiere::Resampler::getPitchShift  
 

Definition at line 176 of file resampler.cpp.

int audiere::Resampler::getPosition   [virtual]
 

Returns the current position within the sample source.

Returns :
current position in frames

Implements audiere::SampleSource.

Definition at line 166 of file resampler.cpp.

bool audiere::Resampler::isSeekable   [virtual]
 

Returns :
true if the stream is seekable, false otherwise

Implements audiere::SampleSource.

Definition at line 149 of file resampler.cpp.

int audiere::Resampler::read int    frame_count,
void *    buffer
[virtual]
 

Read frame_count samples into buffer. buffer must be at least |frame_count * GetSampleSize(format) * channel_count| bytes long.

Parameters:
frame_count  number of frames to read
buffer  buffer to store samples in
Returns :
number of frames actually read

Implements audiere::SampleSource.

Definition at line 32 of file resampler.cpp.

References audiere::u16.

void audiere::Resampler::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 74 of file resampler.cpp.

void audiere::Resampler::setPitchShift float    shift
 

Definition at line 171 of file resampler.cpp.

void audiere::Resampler::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

Implements audiere::SampleSource.

Definition at line 159 of file resampler.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Oct 12 01:44:26 2002 for audiere by doxygen1.2.17