Re: Different sample types between Simulator and device
Re: Different sample types between Simulator and device
- Subject: Re: Different sample types between Simulator and device
- From: Will Pragnell <email@hidden>
- Date: Fri, 30 Aug 2013 19:43:16 +0100
>
I'm looking at ioData->mBuffers[i].mNumberChannels for the number of channels, and it always contains 1 on the device (but 2 on the simulator); should I ignore that in favor of what the ASBD says?
Note that there's some difference in meaning relating to mChannelsPerFame depending on whether you're dealing with interleaved or non-interleaved audio. From CoreAudioTypes.h:
Typically, when an ASBD is being used, the fields describe the complete layout
of the sample data in the buffers that are represented by this description -
where typically those buffers are represented by an AudioBuffer that is
contained in an AudioBufferList.
However, when an ASBD has the kAudioFormatFlagIsNonInterleaved flag, the
AudioBufferList has a different structure and semantic. In this case, the ASBD
fields will describe the format of ONE of the AudioBuffers that are contained in
the list, AND each AudioBuffer in the list is determined to have a single (mono)
channel of audio data. Then, the ASBD's mChannelsPerFrame will indicate the
total number of AudioBuffers that are contained within the AudioBufferList -
where each buffer contains one channel. This is used primarily with the
AudioUnit (and AudioConverter) representation of this list - and won't be found
in the AudioHardware usage of this structure.
Haven't read this thread in detail as I don't have time right now, but this seems pertinent. Hope this helps!
Will
_______________________________________________
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