From 7c2f5e6f48fa45fa5b9c87578f3a8fd5050f5a0e Mon Sep 17 00:00:00 2001 From: ferris Date: Wed, 14 Oct 2015 14:57:07 -0700 Subject: [PATCH 1/2] Removed use of "pub extern crate" in lib.rs Fixes #21 --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5e17aeef5..d5da3d762 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,10 +8,10 @@ //! Currently, work has only been started on the [audio_unit](./audio_unit/index.html) module, but //! eventually we'd like to cover at least the majority of the C API. +extern crate coreaudio_sys; +pub use coreaudio_sys as bindings; -pub extern crate coreaudio_sys as bindings; extern crate libc; pub mod audio_unit; pub mod error; - From b81feb77486723e9b33bd5a67cf45060a6fa31df Mon Sep 17 00:00:00 2001 From: ferris Date: Wed, 14 Oct 2015 14:58:05 -0700 Subject: [PATCH 2/2] Removed unnecessary parens in example code Fixes #22 --- examples/sine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sine.rs b/examples/sine.rs index c81448b3c..b8d23185b 100644 --- a/examples/sine.rs +++ b/examples/sine.rs @@ -30,7 +30,7 @@ fn main() { // Construct an Output audio unit. let mut audio_unit = AudioUnit::new(Type::Output, SubType::HalOutput).unwrap(); audio_unit.render_callback(Some(Box::new(move |buffer, num_frames| { - for frame in (0..num_frames) { + for frame in 0..num_frames { let sample = samples.next().unwrap(); for channel in buffer.iter_mut() { channel[frame] = sample;