diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2017-08-12 19:59:29 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2017-08-12 19:59:29 +0200 |
commit | d23fae9da3da625ca87c615a7798570f138aa0f5 (patch) | |
tree | 61e4f0fc8555abcd6482ada9c66950430cfd83c9 | |
parent | 9ff484e2e462d613a3e4746d000e1b0c8f3bd7a1 (diff) | |
parent | 88dc9f058bfc40b56372c0e22983b0b979ad964b (diff) |
Merge branch 'master' of github.com:JWorthe/rusty_microphone
-rw-r--r-- | README.org | 7 | ||||
-rw-r--r-- | src/gui.rs | 3 |
2 files changed, 10 insertions, 0 deletions
@@ -40,6 +40,13 @@ like so: apt-get install libgtk-3-bin libgtk-3-dev libpango1.0-0 #+END_SRC +On Fedora + +#+BEGIN_SRC sh +yum install gtk3-devel portaudio-devel +#+END_SRC + + ** Compiling and running To compile the project: @@ -163,6 +163,9 @@ fn start_listening_current_dropdown_value(dropdown: >k::ComboBoxText, mic_send fn start_processing_audio(mic_receiver: Receiver<Vec<f32>>, cross_thread_state: Arc<RwLock<CrossThreadState>>) { thread::spawn(move || { while let Ok(samples) = mic_receiver.recv() { + //just in case we hit performance difficulties, clear out the channel + while mic_receiver.try_recv().ok() != None {} + let signal = ::transforms::align_to_rising_edge(&samples); let correlation = ::transforms::correlation(&samples); let fundamental = ::transforms::find_fundamental_frequency_correlation(&samples, ::audio::SAMPLE_RATE); |