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§
Required Methods§
Sourcefn mix_format(config: ClientConfig) -> WAVEFORMATEXTENSIBLE
fn mix_format(config: ClientConfig) -> WAVEFORMATEXTENSIBLE
Construct a wave format specification compatible with the current sample type.
Sourceunsafe fn is_compatible_with(mix_format: *const WAVEFORMATEX) -> bool
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".