Defined in carb/audio/AudioUtils.h

inline size_t carb::audio::convertUnits(size_t input, UnitType inputUnits, UnitType outputUnits, const SoundFormat *format)

converts an input value from one unit to another.

  • input[in] the input value to be converted.

  • inputUnits[in] the units to convert the input value from.

  • outputUnits[in] the units to convert the input value to.

  • format[in] the format information for the sound that the input value is being converted for. This may not be nullptr.


the converted value in the requested output units.


0 if an invalid input or output unit value was given.