#include <SoundTouch.h>

Definition at line 119 of file SoundTouch.h.
Public Member Functions | |
| SoundTouch () | |
| virtual | ~SoundTouch () |
| void | setRate (float newRate) |
| Sets new rate control value. | |
| void | setTempo (float newTempo) |
| Sets new tempo control value. | |
| void | setRateChange (float newRate) |
| Sets new rate control value as a difference in percents compared to the original rate (-50 . | |
| void | setTempoChange (float newTempo) |
| Sets new tempo control value as a difference in percents compared to the original tempo (-50 . | |
| void | setPitch (float newPitch) |
| Sets new pitch control value. | |
| void | setPitchOctaves (float newPitch) |
| Sets pitch change in octaves compared to the original pitch (-1.00 . | |
| void | setPitchSemiTones (int newPitch) |
| Sets pitch change in semi-tones compared to the original pitch (-12 . | |
| void | setPitchSemiTones (float newPitch) |
| void | setChannels (uint numChannels) |
| Sets the number of channels, 1 = mono, 2 = stereo. | |
| void | setSampleRate (uint srate) |
| Sets sample rate. | |
| void | flush () |
| Flushes the last samples from the processing pipeline to the output. | |
| virtual void | putSamples (const SAMPLETYPE *samples, uint numSamples) |
| Adds 'numSamples' pcs of samples from the 'samples' memory position into the input of the object. | |
| virtual void | clear () |
| Clears all the samples in the object's output and internal processing buffers. | |
| BOOL | setSetting (uint settingId, uint value) |
| Changes a setting controlling the processing system behaviour. | |
| uint | getSetting (uint settingId) const |
| Reads a setting controlling the processing system behaviour. | |
| virtual uint | numUnprocessedSamples () const |
| Returns number of samples currently unprocessed. | |
Static Public Member Functions | |
| static const char * | getVersionString () |
| Get SoundTouch library version string. | |
| static uint | getVersionId () |
| Get SoundTouch library version Id. | |
Protected Attributes | |
| uint | channels |
| Number of channels. | |
| float | rate |
| Effective 'rate' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'. | |
| float | tempo |
| Effective 'tempo' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'. | |
Private Member Functions | |
| void | calcEffectiveRateAndTempo () |
| Calculates effective rate & tempo valuescfrom 'virtualRate', 'virtualTempo' and 'virtualPitch' parameters. | |
Private Attributes | |
| class RateTransposer * | pRateTransposer |
| Rate transposer class instance. | |
| class TDStretch * | pTDStretch |
| Time-stretch class instance. | |
| float | virtualRate |
| Virtual pitch parameter. Effective rate & tempo are calculated from these parameters. | |
| float | virtualTempo |
| Virtual pitch parameter. Effective rate & tempo are calculated from these parameters. | |
| float | virtualPitch |
| Virtual pitch parameter. Effective rate & tempo are calculated from these parameters. | |
| BOOL | bSrateSet |
| Flag: Has sample rate been set? | |
| SoundTouch::SoundTouch | ( | ) |
Definition at line 93 of file SoundTouch.cpp.
| SoundTouch::~SoundTouch | ( | ) | [virtual] |
Definition at line 116 of file SoundTouch.cpp.
| void SoundTouch::calcEffectiveRateAndTempo | ( | ) | [private] |
Calculates effective rate & tempo valuescfrom 'virtualRate', 'virtualTempo' and 'virtualPitch' parameters.
Definition at line 235 of file SoundTouch.cpp.
Referenced by setPitch(), setPitchOctaves(), setRate(), setRateChange(), setTempo(), setTempoChange(), and SoundTouch().
| const char * SoundTouch::getVersionString | ( | ) | [static] |
| uint SoundTouch::getVersionId | ( | ) | [static] |
| void SoundTouch::setRate | ( | float | newRate | ) |
Sets new rate control value.
Normal rate = 1.0, smaller values represent slower rate, larger faster rates.
Definition at line 160 of file SoundTouch.cpp.
| void SoundTouch::setTempo | ( | float | newTempo | ) |
Sets new tempo control value.
Normal tempo = 1.0, smaller values represent slower tempo, larger faster tempo.
Definition at line 180 of file SoundTouch.cpp.
Referenced by AudioOutputBase::SetStretchFactorLocked().
| void SoundTouch::setRateChange | ( | float | newRate | ) |
Sets new rate control value as a difference in percents compared to the original rate (-50 .
. +100 %)
Definition at line 170 of file SoundTouch.cpp.
| void SoundTouch::setTempoChange | ( | float | newTempo | ) |
Sets new tempo control value as a difference in percents compared to the original tempo (-50 .
. +100 %)
Definition at line 190 of file SoundTouch.cpp.
| void SoundTouch::setPitch | ( | float | newPitch | ) |
Sets new pitch control value.
Original pitch = 1.0, smaller values represent lower pitches, larger values higher pitch.
Definition at line 200 of file SoundTouch.cpp.
| void SoundTouch::setPitchOctaves | ( | float | newPitch | ) |
Sets pitch change in octaves compared to the original pitch (-1.00 .
. +1.00)
Definition at line 210 of file SoundTouch.cpp.
Referenced by setPitchSemiTones().
| void SoundTouch::setPitchSemiTones | ( | int | newPitch | ) |
Sets pitch change in semi-tones compared to the original pitch (-12 .
. +12)
Definition at line 220 of file SoundTouch.cpp.
| void SoundTouch::setPitchSemiTones | ( | float | newPitch | ) |
Definition at line 227 of file SoundTouch.cpp.
| void SoundTouch::setChannels | ( | uint | numChannels | ) |
Sets the number of channels, 1 = mono, 2 = stereo.
Definition at line 141 of file SoundTouch.cpp.
Referenced by AudioOutputBase::Reconfigure(), and AudioOutputBase::SetStretchFactorLocked().
| void SoundTouch::setSampleRate | ( | uint | srate | ) |
Sets sample rate.
Definition at line 283 of file SoundTouch.cpp.
Referenced by AudioOutputBase::Reconfigure(), and AudioOutputBase::SetStretchFactorLocked().
| void SoundTouch::flush | ( | ) |
Flushes the last samples from the processing pipeline to the output.
Clears also the internal processing buffers. Note: This function is meant for extracting the last samples of a sound stream. This function may introduce additional blank samples in the end of the sound stream, and thus it's not recommended to call this function in the middle of a sound stream.
Definition at line 346 of file SoundTouch.cpp.
| void SoundTouch::putSamples | ( | const SAMPLETYPE * | samples, | |
| uint | numSamples | |||
| ) | [virtual] |
Adds 'numSamples' pcs of samples from the 'samples' memory position into the input of the object.
Notice that sample rate _has_to_ be set before calling this function, otherwise throws a runtime_error exception.
| samples | Pointer to sample buffer. |
| numSamples | Number of samples in buffer. Notice that in case of stereo-sound a single sample contains data for both channels. |
Implements FIFOSamplePipe.
Definition at line 293 of file SoundTouch.cpp.
Referenced by AudioOutputBase::_AddSamples(), and flush().
| void SoundTouch::clear | ( | ) | [virtual] |
Clears all the samples in the object's output and internal processing buffers.
Implements FIFOSamplePipe.
Definition at line 459 of file SoundTouch.cpp.
Changes a setting controlling the processing system behaviour.
See the 'SETTING_...' defines for available setting ID's.
| settingId | Setting ID number. see SETTING_... defines. |
| value | New setting value. |
Definition at line 375 of file SoundTouch.cpp.
Referenced by AudioOutputBase::SetStretchFactorLocked().
Reads a setting controlling the processing system behaviour.
See the 'SETTING_...' defines for available setting ID's.
| settingId | Setting ID number, see SETTING_... defines. |
Definition at line 424 of file SoundTouch.cpp.
| uint SoundTouch::numUnprocessedSamples | ( | ) | const [virtual] |
Returns number of samples currently unprocessed.
Definition at line 468 of file SoundTouch.cpp.
Referenced by AudioOutputBase::AddSamples(), and AudioOutputBase::SetAudiotime().
class RateTransposer* soundtouch::SoundTouch::pRateTransposer [private] |
Rate transposer class instance.
Definition at line 123 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), clear(), flush(), getSetting(), putSamples(), setChannels(), setSetting(), SoundTouch(), and ~SoundTouch().
class TDStretch* soundtouch::SoundTouch::pTDStretch [private] |
Time-stretch class instance.
Definition at line 126 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), clear(), flush(), getSetting(), numUnprocessedSamples(), putSamples(), setChannels(), setSampleRate(), setSetting(), SoundTouch(), and ~SoundTouch().
float soundtouch::SoundTouch::virtualRate [private] |
Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
Definition at line 129 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), setRate(), setRateChange(), and SoundTouch().
float soundtouch::SoundTouch::virtualTempo [private] |
Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
Definition at line 132 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), setTempo(), setTempoChange(), and SoundTouch().
float soundtouch::SoundTouch::virtualPitch [private] |
Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
Definition at line 135 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), setPitch(), setPitchOctaves(), and SoundTouch().
BOOL soundtouch::SoundTouch::bSrateSet [private] |
Flag: Has sample rate been set?
Definition at line 138 of file SoundTouch.h.
Referenced by putSamples(), setSampleRate(), and SoundTouch().
uint soundtouch::SoundTouch::channels [protected] |
Number of channels.
Definition at line 146 of file SoundTouch.h.
Referenced by putSamples(), setChannels(), and SoundTouch().
float soundtouch::SoundTouch::rate [protected] |
Effective 'rate' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'.
Definition at line 149 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), putSamples(), and SoundTouch().
float soundtouch::SoundTouch::tempo [protected] |
Effective 'tempo' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'.
Definition at line 152 of file SoundTouch.h.
Referenced by calcEffectiveRateAndTempo(), and SoundTouch().
1.5.5