pub trait Sample: Copy + Default + Sized {
    // Required method
    fn to_f32(self) -> f32;
}
Expand description

A single sample of Linear Pulse Code Modulation (LPCM) encoded audio.

Integers are between a range of -32768 to 32768. Floats are between -1.0 and 1.0.

Required Methods§

source

fn to_f32(self) -> f32

Convert the sample to a float.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sample for f32

source§

fn to_f32(self) -> f32

source§

impl Sample for i8

source§

fn to_f32(self) -> f32

source§

impl Sample for i16

source§

fn to_f32(self) -> f32

source§

impl Sample for u8

source§

fn to_f32(self) -> f32

source§

impl Sample for u16

source§

fn to_f32(self) -> f32

Implementors§