Audacity 3.2.0
|
#include <TimeAndPitchAudioReader.h>
Public Member Functions | |
TimeAndPitchAudioReader (std::unique_ptr< BaseAudioReader > reader) | |
virtual | ~TimeAndPitchAudioReader () |
AudioFormat | getFormat () const override |
bool | canSeek () const override |
bool | setPosition (int64_t newSamplePosition) override |
set the position based on input samples More... | |
int64_t | getPosition () const override |
int64_t | getNumOfSourceSamples () const override |
int32_t | read (Signal32 &outputSignal) override |
int32_t | readTimeAndPitch (Signal32 &outputSignal, double timeStretch=1.0, double pitchFactor=1.0) |
void | setQuality (const TimeAndPitch::QualitySettings &settings) |
void | setLooping (bool flag) |
Private Member Functions | |
int32_t | _read_from_base_reader_append_silence (Signal32 &sig) |
Private Attributes | |
std::unique_ptr< BaseAudioReader > | _base_reader |
Signal32 | _sig |
std::unique_ptr< TimeAndPitch > | _time_and_pitch |
int | _initial_samples_to_discard = 0 |
int | _silent_samples_to_append = 0 |
bool | _looping = false |
Static Private Attributes | |
static constexpr int | _block_size = 512 |
Definition at line 10 of file TimeAndPitchAudioReader.h.
|
inline |
Definition at line 13 of file TimeAndPitchAudioReader.h.
References _block_size, _initial_samples_to_discard, _looping, _silent_samples_to_append, and _time_and_pitch.
|
inlinevirtual |
Definition at line 24 of file TimeAndPitchAudioReader.h.
|
inlineprivate |
read from the base reader, but append some silence at the end. We need this to get the final samples out
Definition at line 154 of file TimeAndPitchAudioReader.h.
References _base_reader, _sig, _silent_samples_to_append, and min().
Referenced by readTimeAndPitch().
|
inlineoverride |
Definition at line 33 of file TimeAndPitchAudioReader.h.
References _base_reader.
Referenced by setPosition().
|
inlineoverride |
Definition at line 28 of file TimeAndPitchAudioReader.h.
References _base_reader.
|
inlineoverride |
Definition at line 59 of file TimeAndPitchAudioReader.h.
References _base_reader.
|
inlineoverride |
Definition at line 54 of file TimeAndPitchAudioReader.h.
References _base_reader.
|
inlineoverride |
Definition at line 64 of file TimeAndPitchAudioReader.h.
References _base_reader.
|
inline |
Read with time stretch and pitch shift. Do not mix this call with normal read() calls.
Definition at line 71 of file TimeAndPitchAudioReader.h.
References _base_reader, _block_size, _initial_samples_to_discard, _looping, _read_from_base_reader_append_silence(), _sig, _time_and_pitch, and min().
|
inline |
Definition at line 144 of file TimeAndPitchAudioReader.h.
References _looping, _silent_samples_to_append, _time_and_pitch, and flag.
|
inlineoverride |
set the position based on input samples
Definition at line 39 of file TimeAndPitchAudioReader.h.
References _base_reader, _initial_samples_to_discard, _looping, _silent_samples_to_append, _time_and_pitch, and canSeek().
|
inline |
Definition at line 139 of file TimeAndPitchAudioReader.h.
References _time_and_pitch, and settings().
|
private |
Definition at line 169 of file TimeAndPitchAudioReader.h.
Referenced by _read_from_base_reader_append_silence(), canSeek(), getFormat(), getNumOfSourceSamples(), getPosition(), read(), readTimeAndPitch(), and setPosition().
|
staticconstexprprivate |
Definition at line 168 of file TimeAndPitchAudioReader.h.
Referenced by readTimeAndPitch(), and TimeAndPitchAudioReader().
|
private |
Definition at line 172 of file TimeAndPitchAudioReader.h.
Referenced by readTimeAndPitch(), setPosition(), and TimeAndPitchAudioReader().
|
private |
Definition at line 174 of file TimeAndPitchAudioReader.h.
Referenced by readTimeAndPitch(), setLooping(), setPosition(), and TimeAndPitchAudioReader().
|
private |
Definition at line 170 of file TimeAndPitchAudioReader.h.
Referenced by _read_from_base_reader_append_silence(), and readTimeAndPitch().
|
private |
Definition at line 173 of file TimeAndPitchAudioReader.h.
Referenced by _read_from_base_reader_append_silence(), setLooping(), setPosition(), and TimeAndPitchAudioReader().
|
private |
Definition at line 171 of file TimeAndPitchAudioReader.h.
Referenced by readTimeAndPitch(), setLooping(), setPosition(), setQuality(), and TimeAndPitchAudioReader().