---
title: mBitsPerChannel
framework: coreaudiotypes
role: symbol
role_heading: Instance Property
path: coreaudiotypes/audiostreambasicdescription/mbitsperchannel
---

# mBitsPerChannel

The number of bits for one audio sample.

## Declaration

```swift
var mBitsPerChannel: UInt32
```

## Discussion

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.

## See Also

### Inspecting a description

- [mFormatID](coreaudiotypes/audiostreambasicdescription/mformatid.md)
- [mFormatFlags](coreaudiotypes/audiostreambasicdescription/mformatflags.md)
- [mSampleRate](coreaudiotypes/audiostreambasicdescription/msamplerate.md)
- [mBytesPerFrame](coreaudiotypes/audiostreambasicdescription/mbytesperframe.md)
- [mChannelsPerFrame](coreaudiotypes/audiostreambasicdescription/mchannelsperframe.md)
- [mBytesPerPacket](coreaudiotypes/audiostreambasicdescription/mbytesperpacket.md)
- [mFramesPerPacket](coreaudiotypes/audiostreambasicdescription/mframesperpacket.md)
- [mReserved](coreaudiotypes/audiostreambasicdescription/mreserved.md)
