summaryrefslogtreecommitdiff
path: root/src/gui.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2017-01-12 11:08:18 +0200
committerJustin Worthe <justin.worthe@gmail.com>2017-01-12 11:08:18 +0200
commit2c1eadd54522e25a826a106461465d14606e4460 (patch)
tree0b20fe08209523d7505121877c96e41bad384f87 /src/gui.rs
parent6f69caf55fda38fc2efbe9e2feb757558444fbf2 (diff)
Simplified failing test so it would pass
It wasn't failing because of some small error, the whole way I find the fundamental needs to be rethought, probably to use correlation instead of an FFT.
Diffstat (limited to 'src/gui.rs')
-rw-r--r--src/gui.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui.rs b/src/gui.rs
index f116c45..5591cd7 100644
--- a/src/gui.rs
+++ b/src/gui.rs
@@ -108,7 +108,7 @@ fn start_processing_audio(mic_receiver: Receiver<Vec<f64>>, pitch_sender: Sender
thread::spawn(move || {
for samples in mic_receiver {
let frequency_domain = ::transforms::fft(samples, 44100.0);
- freq_sender.send(frequency_domain.clone());
+ freq_sender.send(frequency_domain.clone()).ok();
let fundamental = ::transforms::find_fundamental_frequency(&frequency_domain);
let pitch = match fundamental {
Some(fundamental) => ::transforms::hz_to_pitch(fundamental),