Sample

Trait Sample 

Source
pub unsafe trait Sample: Copy {
    const MID: Self;

    // Required methods
    fn mix_format(config: ClientConfig) -> WAVEFORMATEXTENSIBLE;
    unsafe fn is_compatible_with(mix_format: *const WAVEFORMATEX) -> bool;
}
Available on crate feature wasapi only.
Expand description

Trait implemented for types which can be used to feed the output device.

Required Associated Constants§

Source

const MID: Self

The mid level (silent) level of a sample.

Required Methods§

Source

fn mix_format(config: ClientConfig) -> WAVEFORMATEXTENSIBLE

Construct a wave format specification compatible with the current sample type.

Source

unsafe fn is_compatible_with(mix_format: *const WAVEFORMATEX) -> bool

Test if the current sample type is compatible.

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.

Implementations on Foreign Types§

Source§

impl Sample for f32

Source§

impl Sample for i16

Implementors§