carb::audio::alignBytesToFrameFloor
Defined in carb/audio/AudioUtils.h
-
inline size_t carb::audio::alignBytesToFrameFloor(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 previous 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 previous frame boundary if it is not already aligned.
- Returns
the requested byte count unmodified if it is already aligned to a frame boundary.