More than 2 channels in a stream (user-space audio driver)
More than 2 channels in a stream (user-space audio driver)
- Subject: More than 2 channels in a stream (user-space audio driver)
- From: email@hidden
- Date: Mon, 18 Jun 2018 14:54:52 +0100
Hi all,
I’m trying to make a user space audio driver with more than 2 channels of input
and output (without increasing the number of streams). However whenever I try
to do this I find I get passed a NULL ioMainBuffer in doIOOperation.
To try to increase the channel count of both the input and output of the
NullAudio example here’s what I did…
1. Set mChannelsPerFrame to 3 for the AudioStreamBasicDesciption
returned by the kAudioStreamPropertyVirtualFormat and
kAudioStreamPropertyPhysicalFormat properties.
2. Set mChannelsPerFrame to 3 for the AudioStreamRangedDesciption
returned by the kAudioStreamPropertyAvailableVirtualFormats and
kAudioStreamPropertyAvailablePhysicalFormats properties.
3. Updated the test for mChannelsPerFrame to only fail if it != 3 for
the kAudioStreamPropertyVirtualFormat and kAudioStreamPropertyPhysicalFormat
properties.
The above alone is enough to cause a crash in NullAudio as ioMainBuffer will
be NULL and will therefore crash when trying to doing the memset (the amount of
memory zero’d would also have to be increased but I didn’t get that far). In
addition to this however I also…
1. Multiplied sizeof(AudioChannelDescription) by 3 when getting the
size of the kAudioDevicePropertyPrefferedChannelLayout property.
2. Set mNumberChannelDescriptions to 3 for the
kAudioDevicePropertyPrefferedChannelLayout property.
3. Increased the number of AudioChannelDescription objects added to
mChannelDescriptions to 3 for the kAudioDevicePropertyPrefferedChannelLayout
property.
Is there anything else I should / shouldn't do?
Many thanks.
Anthony Nicholls
email@hidden
Sonnox Ltd. Registered in England and Wales, number 05820431
Registered Office: The Studio, Witney Lakes Resort, Downs Road, Witney,
Oxfordshire. OX29 0SY
http://www.sonnox.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden