Defined in carb/audio/AudioUtils.h

constexpr size_t carb::audio::framesToBytes(size_t frames, size_t channels, SampleFormat format)

converts a frame count to a byte offset.

  • frames[in] the frame count to be converted to a byte count.

  • channels[in] the number of channels in the audio data format.

  • format[in] the sample format of the data. This must be a PCM sample format.


the calculated byte offset to the start of the requested frame of audio data.