forked from AudioKit/AudioKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workaround for connection format bug (AudioKit#2811)
* Add a workaround for connection format bug There is a bug when using destination point API and providing only one point: http://openradar.appspot.com/radar?id=5490575180562432 * Add a note about channel layout when using matrix mixer * Disable test on tvOS
- Loading branch information
Showing
3 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Copyright AudioKit. All Rights Reserved. Revision History at http://github.com/AudioKit/AudioKit/ | ||
|
||
/// Matrix Mixer allows you to map X input channels to Y output channels | ||
/// Matrix Mixer allows you to map X input channels to Y output channels. | ||
/// There is almost no documentation about how matrix mixer audio unit works. | ||
/// This implementation is a result of consolidating various online resources: | ||
/// - https://stackoverflow.com/questions/48059405/how-should-an-aumatrixmixer-be-configured-in-an-avaudioengine-graph | ||
|
@@ -9,11 +9,21 @@ | |
/// - https://lists.apple.com/archives/coreaudio-api/2006/Jul/msg00047.html | ||
/// - https://lists.apple.com/archives/coreaudio-api/2008/Jun/msg00116.html | ||
/// | ||
/// In order to be able to use Matrix Mixer upstream connections will need to have | ||
/// In order to be able to use Matrix Mixer, upstream connections will need to have | ||
/// different format then downstream. Downstream connections are determined by | ||
/// output node's channel count. But for matrix mixer to be able to count input channels | ||
/// output node's channel count. But, for matrix mixer to be able to count input channels | ||
/// correctly, upstream connections need to preserve source number of channels. | ||
/// This can be done using `Node.outputFormat`. | ||
/// | ||
/// Additionally, you might need to set audio format channel layout. | ||
/// Even though it seems like `kAudioChannelLayoutTag_DiscreteInOrder` should be used, you will likely need `kAudioChannelLayoutTag_Unknown` | ||
/// See: | ||
/// https://www.mail-archive.com/[email protected]/msg01143.html | ||
/// ``` | ||
/// let multiChannelLayout = AVAudioChannelLayout( | ||
/// layoutTag: kAudioChannelLayoutTag_Unknown | outputFormat.channelCount | ||
/// )! | ||
/// ``` | ||
|
||
import AVFAudio | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters