Trait rotary::Sample[][src]

pub unsafe trait Sample: Copy + Default { }

A sample that can be stored in an audio buffer.

Copy guarantees that the sample cannot have a destructor.

Safety

Implementor must make sure that a bit-pattern of all-zeros is a legal bit-pattern for the implemented type.

Implementations on Foreign Types

impl Sample for f32[src]

The bit-pattern of all zeros is a legal bit-pattern for floats.

See for example: https://doc.rust-lang.org/std/primitive.f32.html#method.to_bits.

Proof:

assert_eq!((0.0f32).to_bits(), 0u32);
assert_eq!((0.0f64).to_bits(), 0u64);

impl Sample for f64[src]

Loading content...

Implementors

Loading content...