Enum soundtouch::Setting
source · #[repr(u8)]pub enum Setting {
UseAaFilter = 0,
AaFilterLength = 1,
UseQuickseek = 2,
SequenceMs = 3,
SeekwindowMs = 4,
OverlapMs = 5,
NominalInputSequence = 6,
NominalOutputSequence = 7,
InitialLatency = 8,
}Expand description
A list of settings that can be enabled or disabled.
Variants§
UseAaFilter = 0
Enable/disable anti-alias filter in pitch transposer (0 = disable)
AaFilterLength = 1
Pitch transposer anti-alias filter length (8 .. 128 taps, default = 32)
UseQuickseek = 2
Enable/disable quick seeking algorithm in tempo changer routine (enabling quick seeking lowers CPU utilization but causes a minor sound quality compromising)
SequenceMs = 3
Time-stretch algorithm single processing sequence length in milliseconds. This determines to how long sequences the original sound is chopped in the time-stretch algorithm. See STTypes.h or README for more information.
SeekwindowMs = 4
Time-stretch algorithm seeking window length in milliseconds for algorithm that finds the best possible overlapping location. This determines from how wide window the algorithm may look for an optimal joining location when mixing the sound sequences back together. See STTypes.h or README for more information.
OverlapMs = 5
Time-stretch algorithm overlap length in milliseconds. When the chopped sound sequences are mixed back together, to form a continuous sound stream, this parameter defines over how long period the two consecutive sequences are let to overlap each other. See STTypes.h or README for more information.
NominalInputSequence = 6
Call get_setting with this ID to query processing sequence size in samples.
This value gives approximate value of how many input samples you’ll need to
feed into SoundTouch after initial buffering to get out a new batch of
output samples.
This value does not include initial buffering at beginning of a new processing
stream, use INITIAL_LATENCY to get the initial buffering size.
Notices:
-
This is read-only parameter, i.e. setSetting ignores this parameter
-
This parameter value is not pub constant but change depending on tempo/pitch/rate/samplerate settings.
NominalOutputSequence = 7
Call get_setting with this ID to query nominal average processing output
size in samples. This value tells approcimate value how many output samples
SoundTouch outputs once it does DSP processing run for a batch of input samples.
Notices:
- This is read-only parameter, i.e.
set_settingignores this parameter - This parameter value is not pub constant but change depending on tempo/pitch/rate/samplerate settings.
InitialLatency = 8
Call get_setting with this ID to query initial processing latency, i.e.
approx. how many samples you’ll need to enter to SoundTouch pipeline before
you can expect to get first batch of ready output samples out.
After the first output batch, you can then expect to get approx.
NOMINAL_OUTPUT_SEQUENCE ready samples out for every
NOMINAL_INPUT_SEQUENCE samples that you enter into SoundTouch.
Example: processing with parameter -tempo=5 => initial latency = 5509 samples input sequence = 4167 samples output sequence = 3969 samples
Accordingly, you can expect to feed in approx. 5509 samples at beginning of the stream, and then you’ll get out the first 3969 samples. After that, for every approx. 4167 samples that you’ll put in, you’ll receive again approx. 3969 samples out.
This also means that average latency during stream processing is
INITIAL_LATENCY-OUTPUT_SEQUENCE/2, in the above example case 5509-3969/2
= 3524 samples
Notices:
-
This is read-only parameter, i.e.
set_settingignores this parameter -
This parameter value is not pub constant but change depending on tempo/pitch/rate/samplerate settings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Setting
impl RefUnwindSafe for Setting
impl Send for Setting
impl Sync for Setting
impl Unpin for Setting
impl UnwindSafe for Setting
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)