Skip to content

Commit 56baa06

Browse files
committed
Correct docs
1 parent 97249cc commit 56baa06

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

examples/sine.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ fn run() -> Result<(), coreaudio::Error> {
3030
let mut samples = Iter { value: 0.0 }
3131
.map(|phase| (phase * PI * 2.0).sin() as f32 * 0.15);
3232

33-
// Construct an Output audio unit.
34-
//
35-
// "HAL" stands for "Hardware Abstraction Layer". `HalOutput` is the simplest, light-weight
36-
// audio unit for creating an output stream.
37-
let mut audio_unit = try!(AudioUnit::new(IOType::HalOutput));
33+
// Construct an Output audio unit that delivers audio to the default output device.
34+
let mut audio_unit = try!(AudioUnit::new(IOType::DefaultOutput));
3835

3936
let stream_format = try!(audio_unit.stream_format());
4037
println!("{:#?}", &stream_format);

src/audio_unit/types.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,16 @@ pub enum IOType {
407407
/// An audio unit that responds to start/stop calls and provides basic services for converting
408408
/// to and from linear PCM formats.
409409
///
410+
/// Use this audio unit when sending the output of an audio processing graph to your
411+
/// application rather than to the output audio hardware. You would typically use the Generic
412+
/// Output unit for offline audio processing. Just like the other I/O units, the Generic Output
413+
/// unit incorporates a Format Converter unit. This lets the Generic Output unit perform format
414+
/// conversion between the stream format used in an audio processing graph and the format you
415+
/// want.
416+
///
417+
/// You can also use a Generic Output unit as the final node in a subgraph that you place into
418+
/// a parent audio processing graph.
419+
///
410420
/// **Available** in OS X v10.2 and later.
411421
GenericOutput = 1734700658,
412422
/// An audio unit that can provides input/output connection to an a specified audio device.

0 commit comments

Comments
 (0)