Skip to content

Commit 96cf6db

Browse files
committed
Improve AudioUnit API by splitting up SubType variants into enums associated with their respective Type variants. Closes #35.
1 parent 00b2ff8 commit 96cf6db

File tree

3 files changed

+423
-72
lines changed

3 files changed

+423
-72
lines changed

examples/sine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
extern crate coreaudio_rs as coreaudio;
44
extern crate num;
55

6-
use coreaudio::audio_unit::{AudioUnit, Type, SubType};
6+
use coreaudio::audio_unit::{AudioUnit, IOType};
77
use num::Float;
88
use std::f64::consts::PI;
99

@@ -28,7 +28,7 @@ fn main() {
2828
.map(|phase| (phase * PI * 2.0).sin() as f32 * 0.15);
2929

3030
// Construct an Output audio unit.
31-
let mut audio_unit = AudioUnit::new(Type::Output, SubType::HalOutput).unwrap();
31+
let mut audio_unit = AudioUnit::new(IOType::HalOutput).unwrap();
3232

3333
// Pass the audio unit a callback for filling the buffer.
3434
audio_unit.set_render_callback(Some(Box::new(move |buffer, num_frames| {

0 commit comments

Comments
 (0)