pygame documentation | || Home || Help Contents || || CD || Channel || Font || Joystick || Movie || Rect || Sound || || Surface || pygame || UserRect || cdrom || constants || cursors || display || || draw || event || font || image || joystick || key || mixer || || mixer_music || mouse || movie || surfarray || time || transform || version ||

## Channel

Channel objects represent a single channel of sound. Each channel can only playback one Sound object at a time. If your application only requires simply sound playback, you will usually not need to bother with the Channel objects, they exist for finer playback control.
Sound objects can be retrieved from the pygame.mixer module with functions like pygame.mixer.Channel() and pygame.mixer.find_channel(). Also, each time you call Sound.play() a Channel object will be returned, representing the channel that sound is playing on.

fadeout | - fade out the channel
get_busy | - query state of the channel
get_volume | - query the volume for the
pause | - temporarily stop the channel
play | - play a sound on this channel
set_volume | - set volume for channel
stop | - stop playing on the channel
unpause | - restart a paused channel

fadeout
`Channel.fadeout(millisec) -> None`

Fade out the playing sound and stops it over the given millisonds.

get_busy
`Channel.get_busy() -> bool`

Returns true when there is a sound actively playing on this channel.

get_volume
`Channel.get_volume() -> val`

Returns the current volume for this sound object. The value is between 0.0 and 1.0.

pause
`Channel.pause() -> None`

Stops the sound that is playing on this channel, but it can be resumed with a call to unpause()

play
`Channel.play(Sound, [loops, [maxtime]]) -> None`

Starts playing a given sound on this channel. If the channels is currently playing a different sound, it will be replaced/restarted with the given sound. Loops controls how many extra times the sound will play, a negative loop will play indefinitely, it defaults to 0. Maxtime is the number of totalmilliseconds that the sound will play. It defaults to forever (-1).

set_volume
`Channel.set_volume(val) -> None`

Sets the volume for the channel. The channel's volume level is mixed with the volume for the active sound object. The value is between 0.0 and 1.0.

stop
`Channel.stop() -> None`

Stops the sound that is playing on this channel.

unpause
`Channel.unpause() -> None`

Restarts a paused channel where it was paused.