carb::audio::sampleFormatToBitsPerSample

Defined in carb/audio/AudioUtils.h

constexpr size_t carb::audio::sampleFormatToBitsPerSample(SampleFormat fmt)

retrieves the number of bits per channel for a given sample format.

Parameters

fmt[in] the sample format to retrieve the bit count for. This may be any of the SampleFormat::ePcm* formats. There is no defined bit count for the raw and default formats.

Returns

the number of bits per sample associated with the requested sample format.