carb::audio::alignBytesToFrameCeil

Defined in carb/audio/AudioUtils.h

inline size_t carb::audio::alignBytesToFrameCeil(size_t bytes, const SoundFormat *format)

aligns a byte count to a frame boundary for an audio data format.

Parameters
  • bytes[in] the byte count to align to a frame boundary. This will be aligned to the next higher frame boundary if it is not already aligned.

  • format[in] the format information block for the sound data this time is being converted for.

Returns

the requested byte count aligned to the next frame boundary if it is not already aligned.

Returns

the requested byte count unmodified if it is already aligned to a frame boundary.