Struct sdl2::mixer::Channel [−][src]
pub struct Channel(pub i32);Expand description
Sound effect channel.
Tuple Fields
0: i32Implementations
Set the volume for any allocated channel.
Returns the channels volume on scale of 0 to 128.
Play chunk on channel, or if channel is -1, pick the first free unreserved channel.
Play chunk on channel, or if channel is -1, pick the first free unreserved channel.
pub fn fade_in_timed(
self,
chunk: &Chunk,
loops: i32,
ms: i32,
ticks: i32
) -> Result<Channel, String>
Gradually fade out which channel over ms milliseconds starting from now.
if channel is playing, or not.
if channel is fading in, out, or not
Get the most recent sample chunk pointer played on channel.
This removes all effects registered to channel.
Sets a panning effect, where left and right is the volume of the left and right channels. They range from 0 (silence) to 255 (loud).
Unregisters panning effect.
This effect simulates a simple attenuation of volume due to distance. distance ranges from 0 (close/loud) to 255 (far/quiet).
Unregisters distance effect.
This effect emulates a simple 3D audio effect. angle ranges from 0 to 360 degrees going clockwise, where 0 is directly in front. distance ranges from 0 (close/loud) to 255 (far/quiet).
Unregisters position effect.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Channel
impl UnwindSafe for Channel
Blanket Implementations
Mutably borrows from an owned value. Read more