Fix gain compensation in STFT examples

This commit is contained in:
Robbert van der Helm
2022-04-28 17:24:35 +02:00
parent e35886c216
commit 58d7dc034c
2 changed files with 2 additions and 3 deletions

View File

@@ -205,8 +205,7 @@ impl Plugin for PubertySimulator {
let window_size = self.window_size();
let overlap_times = self.overlap_times();
let sample_rate = context.transport().sample_rate;
let gain_compensation: f32 =
(overlap_times as f32 / 2.0).sqrt().recip() / window_size as f32;
let gain_compensation: f32 = (overlap_times as f32 / 2.0).recip() / window_size as f32;
// If the window size has changed since the last process call, reset the buffers and chance
// our latency. All of these buffers already have enough capacity