Skip to content

Instantly share code, notes, and snippets.

@mstultz
Last active December 28, 2016 01:02
Show Gist options
  • Save mstultz/b8bb562ade4bdbe458eb4628b407ad39 to your computer and use it in GitHub Desktop.
Save mstultz/b8bb562ade4bdbe458eb4628b407ad39 to your computer and use it in GitHub Desktop.
Coreaudio-api mailing list
                 __________
 [Bus 1: Mic]-->|          |-->[Bus 1: App]
                | RemoteIO |
 [Bus 0: App]-->|          |-->[Bus 0: Speaker]
                 ----------
let status = AudioUnitSetProperty(audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, UInt32(bus), &enableIO, UInt32(MemoryLayout<UInt32>.size))

Will cause the Microphone permissions to show

Coreaudio-api mailing list

AUMatrixMixer:

William Stewart wrote:

No SRC - the matrix mixer assumes that all of its inputs and outputs are at the same sample rate

http://lists.apple.com/archives/coreaudio-api/2008/Oct/msg00194.html

AUMatrixMixer:

James Mccartney wrote:

The matrix mixer allows you to connect any number of input and ouput elements with any number of channels each. You need to make sure you set the stream formats of the inputs and outputs so that the channel numbers are correct. Each input and output channel is numbered sequentially across all elements. So if you were to connect one stereo inputs, one mono input, and another stereo input, the channels in the mixer would be numbered as follows:

stereo: 0 1
mono: 2
stereo: 3 4

Outputs are numbered in a similar fashion.

The channel numbers are what you use to set gains in the matrix. The matrix has 4 gain controls that can affect any particular route from input to output:

master gain (global scope) - affects the gain of all outputs

input channel gain (input scope) - affects the gain of a particular input channel

output channel gain (output scope) - affects the gain of a particular output channel

crosspoint gain (global scope) - controls the gain of a single input channel going to a single output channel. You make connections from inputs to outputs by setting crosspoint gains to nonzero values.

When setting crosspoint gain parameters, the element number is used differently from other audio units. Crosspoints are set using an element number that is constructed from both the input and the output channel numbers as follows:

element_number = (input_channel << 16) | output_channel

Master gain has element number 0xFFFFFFFF.

http://lists.apple.com/archives/coreaudio-api/2008/Apr/msg00169.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment