Skip to content

Commit

Permalink
extend to negative frequencies
Browse files Browse the repository at this point in the history
i'm a goofball :3
  • Loading branch information
tomara-x committed Jul 4, 2024
1 parent 0a1f052 commit a5771d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,13 @@ impl AudioNode for Rfft {
real_fft(self.input.as_slice(), self.output.as_mut_slice());
}
self.input[i] = input[0];
let buffer = if i <= self.n/2 {
if i <= self.n/2 {
let out = self.output[i];
[out.re, out.im]
[out.re, out.im].into()
} else {
[0., 0.]
};
buffer.into()
let out = self.output[self.n - i].conj();
[out.re, out.im].into()
}
}

fn reset(&mut self) {
Expand Down

0 comments on commit a5771d3

Please sign in to comment.