Trait cubeb::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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sample for f32

source§

impl Sample for i16

Implementors§