Struct kira::Frame [−][src]
An audio sample with a left and right channel.
Fields
left: f32
The sample for the left channel.
right: f32
The sample for the right channel.
Implementations
impl Frame
[src]
impl Frame
[src]pub fn new(left: f32, right: f32) -> Self
[src]
Creates a frame with the given left and right values.
pub fn from_mono(value: f32) -> Self
[src]
Creates a frame with both the left and right channels set to the same value.
pub fn from_i32(left: i32, right: i32, bit_depth: u32) -> Self
[src]
Creates a frame from i32
s with the given bit depth.
pub fn panned(self, x: f32) -> Self
[src]
Pans a frame to the left or right.
An x
of 0 represents a hard left panning, an x
of 1
represents a hard right panning.
Trait Implementations
impl StructuralPartialEq for Frame
[src]
impl StructuralPartialEq for Frame
[src]Auto Trait Implementations
impl RefUnwindSafe for Frame
impl RefUnwindSafe for Frame
impl UnwindSafe for Frame
impl UnwindSafe for Frame