ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Audio::SimpleRateConverter< stereo, reverseStereo > Class Template Reference

Audio rate converter based on simple resampling. More...

Inheritance diagram for Audio::SimpleRateConverter< stereo, reverseStereo >:
Collaboration diagram for Audio::SimpleRateConverter< stereo, reverseStereo >:

List of all members.

Public Member Functions

 SimpleRateConverter (st_rate_t inrate, st_rate_t outrate)
int flow (AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r)
int drain (st_sample_t *obuf, st_size_t osamp, st_volume_t vol)
 SimpleRateConverter (st_rate_t inrate, st_rate_t outrate)
int flow (AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r)
int drain (st_sample_t *obuf, st_size_t osamp, st_volume_t vol)

Protected Attributes

st_sample_t inBuf [INTERMEDIATE_BUFFER_SIZE]
const st_sample_tinPtr
int inLen
long opos
 position of how far output is ahead of input
long opos_inc
 fractional position increment in the output stream
SimpleRateDetails sr

Detailed Description

template<bool stereo, bool reverseStereo>
class Audio::SimpleRateConverter< stereo, reverseStereo >

Audio rate converter based on simple resampling.

Used when no interpolation is required.

Limited to sampling frequency <= 65535 Hz.

Definition at line 67 of file rate.cpp.


Constructor & Destructor Documentation

template<bool stereo, bool reverseStereo>
Audio::SimpleRateConverter< stereo, reverseStereo >::SimpleRateConverter ( st_rate_t  inrate,
st_rate_t  outrate 
)

Definition at line 93 of file rate.cpp.

template<bool stereo, bool reverseStereo>
Audio::SimpleRateConverter< stereo, reverseStereo >::SimpleRateConverter ( st_rate_t  inrate,
st_rate_t  outrate 
)

Member Function Documentation

template<bool stereo, bool reverseStereo>
int Audio::SimpleRateConverter< stereo, reverseStereo >::drain ( st_sample_t obuf,
st_size_t  osamp,
st_volume_t  vol 
) [inline, virtual]

Implements Audio::RateConverter.

Definition at line 83 of file rate.cpp.

template<bool stereo, bool reverseStereo>
int Audio::SimpleRateConverter< stereo, reverseStereo >::drain ( st_sample_t obuf,
st_size_t  osamp,
st_volume_t  vol 
) [inline, virtual]

Implements Audio::RateConverter.

Definition at line 109 of file rate_arm.cpp.

template<bool stereo, bool reverseStereo>
int Audio::SimpleRateConverter< stereo, reverseStereo >::flow ( AudioStream input,
st_sample_t obuf,
st_size_t  osamp,
st_volume_t  vol_l,
st_volume_t  vol_r 
) [virtual]
Returns:
Number of sample pairs written into the buffer.

Implements Audio::RateConverter.

template<bool stereo, bool reverseStereo>
int Audio::SimpleRateConverter< stereo, reverseStereo >::flow ( AudioStream input,
st_sample_t obuf,
st_size_t  osamp,
st_volume_t  vol_l,
st_volume_t  vol_r 
) [virtual]
Returns:
Number of sample pairs written into the buffer.

Implements Audio::RateConverter.

Definition at line 115 of file rate.cpp.


Member Data Documentation

template<bool stereo, bool reverseStereo>
st_sample_t Audio::SimpleRateConverter< stereo, reverseStereo >::inBuf[INTERMEDIATE_BUFFER_SIZE] [protected]

Definition at line 69 of file rate.cpp.

template<bool stereo, bool reverseStereo>
int Audio::SimpleRateConverter< stereo, reverseStereo >::inLen [protected]

Definition at line 71 of file rate.cpp.

template<bool stereo, bool reverseStereo>
const st_sample_t* Audio::SimpleRateConverter< stereo, reverseStereo >::inPtr [protected]

Definition at line 70 of file rate.cpp.

template<bool stereo, bool reverseStereo>
long Audio::SimpleRateConverter< stereo, reverseStereo >::opos [protected]

position of how far output is ahead of input

Holds what would have been opos-ipos

Definition at line 75 of file rate.cpp.

template<bool stereo, bool reverseStereo>
long Audio::SimpleRateConverter< stereo, reverseStereo >::opos_inc [protected]

fractional position increment in the output stream

Definition at line 78 of file rate.cpp.

template<bool stereo, bool reverseStereo>
SimpleRateDetails Audio::SimpleRateConverter< stereo, reverseStereo >::sr [protected]

Definition at line 105 of file rate_arm.cpp.


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


Generated on Sat Jan 12 2019 05:03:56 for ResidualVM by doxygen 1.7.1
curved edge   curved edge