pub trait FromNativeSample: Sized + Copy + Default + 'static {
    // Required methods
    fn from_f16(value: f16) -> Self;
    fn from_f32(value: f32) -> Self;
    fn from_u32(value: u32) -> Self;
}
Expand description

Create an arbitrary sample type from one of the defined sample types. Should be compiled to a no-op where the file contains the predicted sample type.

Required Methods§

source

fn from_f16(value: f16) -> Self

Create this sample from a f16, trying to represent the same numerical value

source

fn from_f32(value: f32) -> Self

Create this sample from a f32, trying to represent the same numerical value

source

fn from_u32(value: u32) -> Self

Create this sample from a u32, trying to represent the same numerical value

Implementations on Foreign Types§

source§

impl FromNativeSample for f32

source§

fn from_f16(value: f16) -> Self

source§

fn from_f32(value: f32) -> Self

source§

fn from_u32(value: u32) -> Self

source§

impl FromNativeSample for u32

source§

fn from_f16(value: f16) -> Self

source§

fn from_f32(value: f32) -> Self

source§

fn from_u32(value: u32) -> Self

Implementors§