kAudioOutputUnitProperty_EnableIO
Specifies whether audio I/O is enabled for an I/O unit bus-scope combination.
Declaration
var kAudioOutputUnitProperty_EnableIO: AudioUnitPropertyID { get }Discussion
An I/O unit’s bus 0 connects to output hardware, such as for playback through a speaker. Output is enabled by default. To disable output, the bus 0 output scope must be disabled, as follows:
UInt32 enableOutput = 0; // to disable output
AudioUnitElement outputBus = 0;
AudioUnitSetProperty (
io_unit_instance,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Output,
outputBus,
&enableOutput,
sizeof (enableOutput)
);An I/O unit’s bus 1 connects to input hardware, such as for recording from a microphone. Input is disabled by default. To enable input, the bus 1 input scope must be enabled, as follows:
UInt32 enableInput = 1; // to enable input
AudioUnitElement inputBus = 1;
AudioUnitSetProperty (
io_unit_instance,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Input,
inputBus,
&enableInput,
sizeof (enableInput)
);A read/write UInt32 value valid on the input and output scopes.