|
arduino-audio-tools
|
Converts from a source to a target number with a different type. More...
#include <AudioTypes.h>
Static Public Member Functions | |
| static int32_t | clip (float value, int bits) |
| clips a value | |
| template<typename T > | |
| static T | clipT (float value) |
| Clips the value to avoid any over or underflows. | |
| template<typename FromT , typename ToT > | |
| static ToT | convert (FromT value) |
| Convert an int number from one type to another. | |
| template<typename FromT , typename ToT > | |
| static void | convertArray (FromT *from, ToT *to, int samples, float vol=1.0f) |
| Convert an array of int types. | |
| static int32_t | fromFloat (float value, int bits) |
| Convert a float (with max 1.0) to an integer autio type. | |
| template<typename T > | |
| static T | fromFloatT (float value) |
| Convert a float (with max 1.0) to an integer autio type. | |
| static int64_t | maxValue (int value_bits_per_sample) |
| provides the biggest number for the indicated number of bits | |
| template<typename T > | |
| static float | maxValueT () |
| provides the biggest number for the indicated type | |
| template<typename T > | |
| static float | minValueT () |
| static float | toFloat (int32_t value, int bits) |
| Convert an integer integer autio type to a float (with max 1.0) | |
| template<typename T > | |
| static float | toFloatT (T value) |
| Convert an integer integer autio type to a float (with max 1.0) | |
Converts from a source to a target number with a different type.
Clips the value to avoid any over or underflows.
Convert an int number from one type to another.
Convert an array of int types.
Convert a float (with max 1.0) to an integer autio type.
Convert a float (with max 1.0) to an integer autio type.
provides the biggest number for the indicated number of bits
provides the biggest number for the indicated type
Convert an integer integer autio type to a float (with max 1.0)
Convert an integer integer autio type to a float (with max 1.0)