Skip to main content

Sample

Trait Sample 

Source
pub trait Sample: Send + Copy {
    // Required method
    fn from_float(_: f32) -> Self;
}
Expand description

An extension trait which allows the implementation of converting void* buffers from libcubeb-sys into rust slices of the appropriate type.

Required Methods§

Source

fn from_float(_: f32) -> Self

Map f32 in range [-1,1] to sample type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Sample for f32

Source§

impl Sample for i16

Implementors§