diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2016-10-13 18:07:21 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2016-10-13 18:07:21 +0200 |
commit | e6cbba66fed669c9c6808584a4f1551cfdb5de30 (patch) | |
tree | 4b218ac7ed0c6c24f249df357b924b198827dfb3 /src/gui.rs | |
parent | b37f7697c100d7f89054c57d8108ee64902865eb (diff) |
Function to start listening on microphone
Messy. To clean up once I've seen if it works.
Diffstat (limited to 'src/gui.rs')
-rw-r--r-- | src/gui.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -8,7 +8,8 @@ pub fn start_gui() -> Result<(), String> { let window = gtk::Window::new(gtk::WindowType::Toplevel); window.set_title("Musician Training"); - let audio_devices = try!(::audio::get_device_list().map_err(|e| e.to_string())); + let pa = ::audio::init().expect("Could not init portaudio"); + let audio_devices = try!(::audio::get_device_list(&pa).map_err(|e| e.to_string())); let dropdown = gtk::ComboBoxText::new(); for (index, name) in audio_devices { dropdown.append(Some(format!("{}", index).as_ref()), name.as_ref()); |