summaryrefslogtreecommitdiff
path: root/src/audio.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2017-07-15 15:28:53 +0200
committerJustin Worthe <justin@worthe-it.co.za>2017-07-15 15:28:53 +0200
commited89f64962d5de120db26f140c8e027991ab2797 (patch)
tree9248f01037c7e68e9742207464ffcb15b6057cab /src/audio.rs
parent4dd91d7fc35685f4ad4c909ba72a03f21185283d (diff)
Decreased window size and increased framerate
The samller windows size has a few effects: 1. the frequency calculation will be less accurate, because less iterations of the binary search will be effective. 2. 'mixed signals', measures at the start or end of a note where half the signal is one thing and the other half is something else will have less impact, since they will be on the screen for less time. The higher frame rate also looks really nice.
Diffstat (limited to 'src/audio.rs')
-rw-r--r--src/audio.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio.rs b/src/audio.rs
index ffaa6ff..98ba84e 100644
--- a/src/audio.rs
+++ b/src/audio.rs
@@ -4,7 +4,7 @@ use portaudio as pa;
use std::sync::mpsc::*;
pub const SAMPLE_RATE: f32 = 44100.0;
-pub const FRAMES: usize = 1024;
+pub const FRAMES: usize = 512;
pub fn init() -> Result<pa::PortAudio, pa::Error> {
pa::PortAudio::new()