pub trait AmpLevels<T: Copy> {
// Required method
fn amp_level(level: u32) -> T;
}Expand description
A digital level to a sample amplitude conversion trait.
Required Methods§
Sourcefn amp_level(level: u32) -> T
fn amp_level(level: u32) -> T
This method should return the appropriate digital sample amplitude for the given level.
The best approximation is a*(level/max_level*b).exp() according to
this document.
Please note that most callbacks use only a limited number of bits in the level.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.