v1.1.1
* Fix bug with `.reset()` after silent input (thanks Steve!)
This commit is contained in:
parent
44c8f865af
commit
1eeba87b13
@ -146,3 +146,7 @@ We'd like to particularly thank the following people who sponsored specific feat
|
||||
|
||||
* **Metronaut**: web audio (JS/WASM) release
|
||||
* **Daniel L Bowling** and the Stanford School of Medicine: web audio improvements
|
||||
|
||||
We're also grateful for the following community contributions:
|
||||
|
||||
* **Steve MacKinnon** for finding/resolving a bug in `.reset()`
|
||||
|
||||
@ -9,8 +9,15 @@
|
||||
#include "util/wav.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
signalsmith::stretch::SignalsmithStretch<float/*, std::mt19937*/> stretch; // optional cheaper RNG for performance comparison
|
||||
|
||||
SimpleArgs args(argc, argv);
|
||||
|
||||
if (args.hasFlag("v", "prints the version")) {
|
||||
std::cout << stretch.version[0] << "." << stretch.version[1] << "." << stretch.version[2] << "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string inputWav = args.arg<std::string>("input.wav", "16-bit WAV file");
|
||||
std::string outputWav = args.arg<std::string>("output.wav", "output WAV file");
|
||||
|
||||
@ -46,7 +53,6 @@ int main(int argc, char* argv[]) {
|
||||
signalsmith::Stopwatch stopwatch;
|
||||
|
||||
stopwatch.start();
|
||||
signalsmith::stretch::SignalsmithStretch<float/*, std::mt19937*/> stretch; // optional cheaper RNG for performance comparison
|
||||
stretch.presetDefault(inWav.channels, inWav.sampleRate);
|
||||
stretch.setTransposeSemitones(semitones, tonality/inWav.sampleRate);
|
||||
double initSeconds = stopwatch.seconds(stopwatch.lap());
|
||||
|
||||
@ -14,7 +14,7 @@ namespace signalsmith { namespace stretch {
|
||||
|
||||
template<typename Sample=float, class RandomEngine=std::default_random_engine>
|
||||
struct SignalsmithStretch {
|
||||
static constexpr size_t version[3] = {1, 1, 0};
|
||||
static constexpr size_t version[3] = {1, 1, 1};
|
||||
|
||||
SignalsmithStretch() : randomEngine(std::random_device{}()) {}
|
||||
SignalsmithStretch(long seed) : randomEngine(seed) {}
|
||||
@ -37,7 +37,7 @@ struct SignalsmithStretch {
|
||||
inputBuffer.reset();
|
||||
prevInputOffset = -1;
|
||||
channelBands.assign(channelBands.size(), Band());
|
||||
silenceCounter = 2*stft.windowSize();
|
||||
silenceCounter = 0;
|
||||
didSeek = false;
|
||||
flushed = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user