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 protected]




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 protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to