From c9fe2a132a683a99fb7028cee3df43d5f75a1007 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Mon, 23 Feb 2015 00:50:06 +1100 Subject: [PATCH] Commiting pre-merge --- src/lib.rs | 12 ++++++++---- src/samples_formats.rs | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index adb57a3..6d597dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,8 +47,7 @@ a conversion on your data. If you have the possibility, you should try to match the format of the voice. */ -#![allow(unstable)] -#![feature(unsafe_destructor)] +#![feature(core, unsafe_destructor)] #![unstable] pub use samples_formats::{SampleFormat, Sample}; @@ -58,13 +57,18 @@ use std::ops::{Deref, DerefMut}; mod conversions; mod samples_formats; -#[cfg(unix)] +#[cfg(target_os = "linux")] #[path="alsa/mod.rs"] mod cpal_impl; + #[cfg(windows)] #[path="wasapi/mod.rs"] mod cpal_impl; +#[cfg(target_os = "macos")] +#[path="core_audio/mod.rs"] +mod cpal_impl; + #[cfg(all(not(windows), not(unix)))] #[path="null/mod.rs"] mod cpal_impl; @@ -87,7 +91,7 @@ pub struct Voice(cpal_impl::Voice); pub type ChannelsCount = u16; /// -#[derive(Show, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct SamplesRate(pub u32); /// Represents a buffer that must be filled with audio data. diff --git a/src/samples_formats.rs b/src/samples_formats.rs index 510129c..a73f7c1 100644 --- a/src/samples_formats.rs +++ b/src/samples_formats.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use std::mem; /// Format that each sample has. -#[derive(Clone, Copy, Show, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum SampleFormat { /// The value 0 corresponds to 0. I16,