Skip to content

Commit e175d64

Browse files
committed
Fix bug where input stream buffer was created using output stream format
This happened to work in the past as in many cases the input stream will have less than or equal to the same number of channels as the output stream. Publishing as 0.9.1.
1 parent 1bdf9c4 commit e175d64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coreaudio-rs"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["mitchmindtree <[email protected]>", "yupferris <[email protected]>"]
55
description = "A friendly rust interface for Apple's CoreAudio API."
66
keywords = ["core", "audio", "unit", "osx", "ios"]

src/audio_unit/render_callback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl AudioUnit {
471471
// First, we'll retrieve the stream format so that we can ensure that the given callback
472472
// format matches the audio unit's format.
473473
let id = sys::kAudioUnitProperty_StreamFormat;
474-
let asbd = self.get_property(id, Scope::Input, Element::Output)?;
474+
let asbd = self.get_property(id, Scope::Input, Element::Input)?;
475475
let stream_format = super::StreamFormat::from_asbd(asbd)?;
476476

477477
// If the stream format does not match, return an error indicating this.

0 commit comments

Comments
 (0)