Struct sdl2_mixer::Channel [] [src]

pub struct Channel(_);

Sound effect channel.

Methods

impl Channel
[src]

Represent for all channels (-1)

This is the MIX_CHANNEL_POST (-2)

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.

Pause channel, or all playing channels if -1 is passed in.

Unpause channel, or all playing and paused channels if -1 is passed in.

Halt channel playback

Halt channel playback, after ticks milliseconds.

Gradually fade out which channel over ms milliseconds starting from now.

if channel is playing, or not.

if channel is paused, 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.

Simple reverse stereo, swaps left and right channel sound. true for reverse, false to unregister effect.

Trait Implementations

impl Debug for Channel
[src]

Formats the value using the given formatter.

impl Copy for Channel
[src]

impl Clone for Channel
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Channel
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.