#include <rate.h>
Public Member Functions | |
virtual int | convert (AudioStream &input, st_sample_t *outBuffer, st_size_t numSamples, st_volume_t vol_l, st_volume_t vol_r)=0 |
virtual void | setInputRate (st_rate_t inputRate)=0 |
virtual void | setOutputRate (st_rate_t outputRate)=0 |
virtual st_rate_t | getInputRate () const =0 |
virtual st_rate_t | getOutputRate () const =0 |
virtual bool | needsDraining () const =0 |
Helper class that handles resampling an AudioStream between an input and output sample rate. Its regular use case is upsampling from the native stream rate to the one used by the sound mixer. However, the input/output rates can be manually adjusted to change playback speed and produce sound effects.
|
pure virtual |
Convert the provided AudioStream to the target sample rate.
input | The AudioStream to read data from. |
outBuffer | The buffer that the resampled audio will be written to. Must have size of at least numSamples . |
numSamples | The desired number of samples to be written into the buffer. |
vol_l | Volume for left channel. |
vol_r | Volume for right channel. |
|
pure virtual |
Does the internal buffer still have some leftover data?