Add cheaper preset

This commit is contained in:
Geraint 2022-11-29 16:36:44 +00:00
parent 450b2fecce
commit 088dad47f6
2 changed files with 5 additions and 1 deletions

View File

@ -14,10 +14,11 @@ signalsmith::stretch::SignalsmithStretch<float> stretch;
### Configuring
The easiest way to configure is `.presetDefault()`:
The easiest way to configure is a `.preset???()` method:
```cpp
stretch.presetDefault(channels, sampleRate);
stretch.presetCheaper(channels, sampleRate);
```
If you want to test out different block-sizes etc. then you can use `.configure()` manually.

View File

@ -40,6 +40,9 @@ struct SignalsmithStretch {
void presetDefault(int nChannels, Sample sampleRate) {
configure(nChannels, sampleRate*0.12, sampleRate*0.03);
}
void presetCheaper(int nChannels, Sample sampleRate) {
configure(nChannels, sampleRate*0.1, sampleRate*0.04);
}
// Manual setup
void configure(int nChannels, int blockSamples, int intervalSamples) {