Instance Property

mBitsPerChannel

The number of bits for one audio sample.

Declaration

var mBitsPerChannel: UInt32

Discussion

For example, for linear PCM audio using the kAudioFormatFlagsCanonical format flags, calculate the number of bits as follows:

mBitsPerChannel = 8 * sizeof(AudioSampleType);

Set the number of bits to 0 for compressed formats.