Module sampara::sample::conv [−][src]
Pure functions and traits for converting between sample types.
Each conversion function is performance focused, memory-sensitive, and expects that the user has pre-validated their input.
No conversion function will ever cast to a type with a size in bytes larger than the largest between the source and target sample types.
The conversion functions do not check the range of incoming values for floating point types.
Note that floating point samples span the range [-1.0, 1.0). This means that
1.0f32.convert_into::<i16>()
will overflow.
Modules
f32 | |
f64 | |
i8 | |
i16 | |
i32 | |
i64 | |
u8 | |
u16 | |
u32 | |
u64 |
Traits
ConvertFrom |
|
ConvertInto |
|
Duplex |
|