3
<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
6
<table cellspacing=3 width=100%><tr><td bgcolor=#00000>
7
<table width=100%><tr><td bgcolor=c2fc20 align=center>
8
<a href=http://www.pygame.org>
9
<img src=../pygame_tiny.gif border=0 width=200 height=60></a><br>
10
<b>pygame documentation</b>
11
</td><td bgcolor=6aee28 align=center valign=top width=100%>
14
<a href=http://www.pygame.org>Home</a> ||
15
<a href=../index.html>Help Contents</a> ||
18
|| <a href=pygame.html>pygame</a> ||
19
<a href=pygame_cdrom.html>cdrom</a> ||
20
<a href=pygame_constants.html>constants</a> ||
21
<a href=pygame_display.html>display</a> ||
22
<a href=pygame_draw.html>draw</a> ||
23
<a href=pygame_event.html>event</a> ||<br>
24
|| <a href=pygame_font.html>font</a> ||
25
<a href=pygame_image.html>image</a> ||
26
<a href=pygame_joystick.html>joystick</a> ||
27
<a href=pygame_key.html>key</a> ||
28
<a href=pygame_mixer.html>mixer</a> ||
29
<a href=pygame_mixer_music.html>mixer_music</a> ||<br>
30
|| <a href=pygame_mouse.html>mouse</a> ||
31
<a href=pygame_movie.html>movie</a> ||
32
<a href=pygame_surfarray.html>surfarray</a> ||
33
<a href=pygame_time.html>time</a> ||
34
<a href=pygame_transform.html>transform</a> ||<br>
35
<br>|| <a href=CD.html>CD</a> ||
36
<a href=Channel.html>Channel</a> ||
37
<a href=Clock.html>Clock</a> ||
38
<a href=Font.html>Font</a> ||
39
<a href=Joystick.html>Joystick</a> ||
40
<a href=Movie.html>Movie</a> ||<br>
41
|| <a href=Rect.html>Rect</a> ||
42
<a href=Sound.html>Sound</a> ||
43
<a href=Surface.html>Surface</a> ||<br>
44
<br>|| <a href=pygame_cursors.html>cursors</a> ||
45
<a href=pygame_sprite.html>sprite</a> ||
46
<a href=pygame_version.html>version</a> ||<br>
49
</td></tr></table></td></tr></table>
51
<h2 align=center>Channel</h2>
52
Channel objects represent a single channel of sound. Each channel
53
can only playback one Sound object at a time. If your application
54
only requires simply sound playback, you will usually not need to
55
bother with the Channel objects, they exist for finer playback
58
Sound objects can be retrieved from the pygame.mixer module with
59
functions like <a href=pygame_mixer.html#Channel>pygame.mixer.Channel()</a> and
60
<a href=pygame_mixer.html#find_channel>pygame.mixer.find_channel()</a>. Also, each time you call
61
<a href=Sound.html#play>Sound.play()</a> a Channel object will be returned, representing the
62
channel that sound is playing on.
67
<tr><td><a href=#fadeout>fadeout</a></td><td> -
68
fade out the channel</td></tr>
71
<tr><td><a href=#get_busy>get_busy</a></td><td> -
72
query state of the channel</td></tr>
75
<tr><td><a href=#get_volume>get_volume</a></td><td> -
76
query the volume for the</td></tr>
79
<tr><td><a href=#pause>pause</a></td><td> -
80
temporarily stop the channel</td></tr>
83
<tr><td><a href=#play>play</a></td><td> -
84
play a sound on this channel</td></tr>
87
<tr><td><a href=#set_volume>set_volume</a></td><td> -
88
set volume for channel</td></tr>
91
<tr><td><a href=#stop>stop</a></td><td> -
92
stop playing on the channel</td></tr>
95
<tr><td><a href=#unpause>unpause</a></td><td> -
96
restart a paused channel</td></tr>
103
<a name=fadeout><font size=+2><b>fadeout
104
</b></font><br><font size=+1><tt>
105
Channel.fadeout(millisec) -> None
107
Fade out the playing sound and stops it over the
111
<a name=get_busy><font size=+2><b>get_busy
112
</b></font><br><font size=+1><tt>
113
Channel.get_busy() -> bool
115
Returns true when there is a sound actively playing on this
119
<a name=get_volume><font size=+2><b>get_volume
120
</b></font><br><font size=+1><tt>
121
Channel.get_volume() -> val
123
Returns the current volume for this sound object. The value is
127
<a name=pause><font size=+2><b>pause
128
</b></font><br><font size=+1><tt>
129
Channel.pause() -> None
131
Stops the sound that is playing on this channel,
132
but it can be resumed with a call to <a href=#unpause>unpause()</a>
135
<a name=play><font size=+2><b>play
136
</b></font><br><font size=+1><tt>
137
Channel.play(Sound, [loops, [maxtime]]) -> None
139
Starts playing a given sound on this channel. If the channels is
140
currently playing a different sound, it will be
141
replaced/restarted with the given sound. Loops controls how many
142
extra times the sound will play, a negative loop will play
143
indefinitely, it defaults to 0. Maxtime is the number of
144
totalmilliseconds that the sound will play. It defaults to
148
<a name=set_volume><font size=+2><b>set_volume
149
</b></font><br><font size=+1><tt>
150
Channel.set_volume(val) -> None
152
Sets the volume for the channel. The channel's volume level is
153
mixed with the volume for the active sound object. The value is
157
<a name=stop><font size=+2><b>stop
158
</b></font><br><font size=+1><tt>
159
Channel.stop() -> None
161
Stops the sound that is playing on this channel.
164
<a name=unpause><font size=+2><b>unpause
165
</b></font><br><font size=+1><tt>
166
Channel.unpause() -> None
168
Restarts a paused channel where it was paused.