Skip to content

Commit

Permalink
Fix bug where input stream buffer was created using output stream format
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mitchmindtree committed Apr 23, 2018
1 parent 1bdf9c4 commit e175d64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coreaudio-rs"
version = "0.9.0"
version = "0.9.1"
authors = ["mitchmindtree <mitchell.nordine@gmail.com>", "yupferris <jake@fusetools.com>"]
description = "A friendly rust interface for Apple's CoreAudio API."
keywords = ["core", "audio", "unit", "osx", "ios"]
Expand Down
2 changes: 1 addition & 1 deletion src/audio_unit/render_callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ impl AudioUnit {
// First, we'll retrieve the stream format so that we can ensure that the given callback
// format matches the audio unit's format.
let id = sys::kAudioUnitProperty_StreamFormat;
let asbd = self.get_property(id, Scope::Input, Element::Output)?;
let asbd = self.get_property(id, Scope::Input, Element::Input)?;
let stream_format = super::StreamFormat::from_asbd(asbd)?;

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

0 comments on commit e175d64

Please sign in to comment.