I have created an aggregated device containing multiple audio devices. I would
like to enable/disable input or output channels from an aggregate CoreAudio
device.
When calling core audio to receive the number of streams (using
kAudioDevicePropertyStreams) the return value is always 1.
I have also tried the implementation in CoreAudio Utility classes:
CAHALAudioDevice::GetIOProcStreamUsage. Still, I could not see how to access
sub-streams and disable/enable them.
What needs to be done to accomplish disable/enable of sub-streams?
Here is CAHALAudioDevice::GetIOProcStreamUsage for reference:
void
// make an AudioHardwareIOProcStreamUsage the right size
UInt32 theNumberStreams = GetNumberStreams(inIsInput);
UInt32 theSize = SizeOf32(void*) + SizeOf32(UInt32) + (theNumberStreams *
SizeOf32(UInt32));
CAAutoFree<AudioHardwareIOProcStreamUsage> theStreamUsage(theSize);
// set it up
theStreamUsage->mIOProc = reinterpret_cast<void*>(inIOProcID);
theStreamUsage->mNumberStreams = theNumberStreams;
// get the property
CAPropertyAddress theAddress(kAudioDevicePropertyIOProcStreamUsage, inIsInput ?
kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput);
GetPropertyData(theAddress, 0, NULL, theSize, theStreamUsage);
// fill out the return value
for(UInt32 theIndex = 0; theIndex < theNumberStreams; ++theIndex)
{
outStreamUsage[theIndex] = (theStreamUsage->mStreamIsOn[theIndex] != 0);
}
}
kAudioDevicePropertyIOProcStreamUsage always returns one stream regardless of
the number of sub devices in the aggregated audio device.
My question is, is there any way to tell CoreAudio not to include the inputs or
outputs of a sub-device in the aggregate device I'm constructing? _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com
This email sent to [email protected]