Dynamic Resampling. We can use a variable factor to speed up or slow down the playback.
More...
|
| ResampleStream (AudioOutput &out) |
|
| ResampleStream (AudioStream &io) |
|
| ResampleStream (Print &out) |
| Support for resampling via write.
|
|
| ResampleStream (Stream &io) |
| Support for resampling via write and read.
|
|
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes.
|
|
virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo
|
|
AudioInfo | audioInfoOut () override |
|
int | available () override |
|
int | availableForWrite () override |
|
bool | begin () override |
|
bool | begin (AudioInfo from, AudioInfo to) |
|
bool | begin (AudioInfo from, int toRate) |
|
bool | begin (AudioInfo from, sample_rate_t toRate) |
|
virtual bool | begin (AudioInfo info) |
|
bool | begin (AudioInfo info, float step) |
|
bool | begin (ResampleConfig cfg) |
|
virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions.
|
|
ResampleConfig | defaultConfig () |
| Provides the default configuraiton.
|
|
void | end () override |
|
void | flush () |
| When buffering is active, writes the buffered audio to the output.
|
|
float | getByteFactor () override |
|
virtual Print * | getPrint () |
|
float | getStepSize () |
| Returns the actual step size.
|
|
float | getStepSize (float sampleRateFrom, float sampleRateTo) |
|
virtual Stream * | getStream () |
|
bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active.
|
|
virtual | operator bool () |
|
size_t | readBytes (uint8_t *data, size_t len) override |
|
virtual size_t | readSilence (uint8_t *buffer, size_t length) |
| Source to generate silence: just sets the buffer to 0.
|
|
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes.
|
|
void | resizeReadResultQueue (int size) |
| Define the size of the interal read result queue: same as transformationReader().resizeResultQueue(size)
|
|
void | setAudioInfo (AudioInfo newInfo) override |
| Defines the input AudioInfo.
|
|
void | setBuffered (bool active) |
| Activates buffering to avoid small incremental writes.
|
|
void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
|
virtual void | setOutput (AudioOutput &print) |
|
virtual void | setOutput (Print &print) override |
| Defines/Changes the output target.
|
|
void | setStepSize (float step) |
| influence the sample rate
|
|
virtual void | setStream (AudioStream &stream) |
|
virtual void | setStream (Stream &stream) override |
| Defines/Changes the input & output.
|
|
void | setTargetSampleRate (int rate) |
|
void | setWriteBufferSize (int size) |
|
virtual TransformationReader< ReformatBaseStream > & | transformationReader () |
| Provides access to the TransformationReader.
|
|
size_t | write (const uint8_t *data, size_t len) override |
|
virtual size_t | write (uint8_t ch) override |
|
virtual void | writeSilence (size_t len) |
| Writes len bytes of silence (=0).
|
|
|
template<typename T > |
T | getValue (T *data, float frame_idx, int channel) |
| get the interpolated value for indicated (float) index value
|
|
template<typename T > |
T | lookup (T *data, int frame, int channel) |
| lookup value for indicated frame & channel: index starts with -1;
|
|
virtual int | not_supported (int out, const char *msg="") |
|
void | notifyAudioChange (AudioInfo info) |
|
void | refillReadBuffer () |
|
void | setupLastSamples (AudioInfo cfg) |
| Sets up the buffer for the rollover samples.
|
|
template<typename T > |
void | setupLastSamples (T *data, int frame) |
| store last samples to provide values for index -1
|
|
void | setupReader () |
|
template<typename T > |
size_t | write (Print *p_out, const uint8_t *buffer, size_t bytes, size_t &written) |
| Writes the buffer to defined output after resampling.
|
|
Dynamic Resampling. We can use a variable factor to speed up or slow down the playback.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
- Template Parameters
-