~ubuntu-branches/ubuntu/warty/pygame/warty

« back to all changes in this revision

Viewing changes to docs/ref/Channel.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-17 17:09:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040917170953-caomeukd8awvvpwv
Tags: 1.6-0.2ubuntu1
Add missing build-depends: python

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
<a href=pygame_mixer_music.html>mixer_music</a> ||<br>
30
30
|| <a href=pygame_mouse.html>mouse</a> || 
31
31
<a href=pygame_movie.html>movie</a> || 
 
32
<a href=pygame_sndarray.html>sndarray</a> || 
32
33
<a href=pygame_surfarray.html>surfarray</a> || 
33
34
<a href=pygame_time.html>time</a> || 
34
35
<a href=pygame_transform.html>transform</a> ||<br>
41
42
|| <a href=Rect.html>Rect</a> || 
42
43
<a href=Sound.html>Sound</a> || 
43
44
<a href=Surface.html>Surface</a> ||<br>
44
 
&nbsp;<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>
 
45
&nbsp;<br>|| <a href=pygame_color.html>color</a> || 
 
46
<a href=pygame_cursors.html>cursors</a> || 
 
47
<a href=pygame_sprite.html>sprite</a> ||<br>
47
48
 
48
49
 
49
50
</td></tr></table></td></tr></table>
72
73
query state of the channel</td></tr>
73
74
 
74
75
 
 
76
<tr><td><a href=#get_endevent>get_endevent</a></td><td> -
 
77
get the endevent for a channel</td></tr>
 
78
 
 
79
 
 
80
<tr><td><a href=#get_queue>get_queue</a></td><td> -
 
81
get the currently queued sound object</td></tr>
 
82
 
 
83
 
 
84
<tr><td><a href=#get_sound>get_sound</a></td><td> -
 
85
get the currently playing sound object</td></tr>
 
86
 
 
87
 
75
88
<tr><td><a href=#get_volume>get_volume</a></td><td> -
76
89
query the volume for the</td></tr>
77
90
 
84
97
play a sound on this channel</td></tr>
85
98
 
86
99
 
 
100
<tr><td><a href=#queue>queue</a></td><td> -
 
101
queue a sound on this channel</td></tr>
 
102
 
 
103
 
 
104
<tr><td><a href=#set_endevent>set_endevent</a></td><td> -
 
105
set an endevent for a channel</td></tr>
 
106
 
 
107
 
87
108
<tr><td><a href=#set_volume>set_volume</a></td><td> -
88
109
set volume for channel</td></tr>
89
110
 
116
137
channel.
117
138
</ul><br>&nbsp;<br>
118
139
 
 
140
<a name=get_endevent><font size=+2><b>get_endevent
 
141
</b></font><br><font size=+1><tt>
 
142
Channel.get_endevent() -> event_type
 
143
</tt></font><ul>
 
144
Returns the end event type for this Channel. If the
 
145
return value is NOEVENT, then no events will be sent
 
146
when playback ends.
 
147
</ul><br>&nbsp;<br>
 
148
 
 
149
<a name=get_queue><font size=+2><b>get_queue
 
150
</b></font><br><font size=+1><tt>
 
151
Channel.get_queue() -> Sound
 
152
</tt></font><ul>
 
153
Return the currently queued Sound object on this channel.
 
154
This will return None if there is nothing queued.
 
155
</ul><br>&nbsp;<br>
 
156
 
 
157
<a name=get_sound><font size=+2><b>get_sound
 
158
</b></font><br><font size=+1><tt>
 
159
Channel.get_sound() -> Sound
 
160
</tt></font><ul>
 
161
Return the currently playing Sound object on this channel.
 
162
This will return None if there is nothing playing.
 
163
</ul><br>&nbsp;<br>
 
164
 
119
165
<a name=get_volume><font size=+2><b>get_volume
120
166
</b></font><br><font size=+1><tt>
121
167
Channel.get_volume() -> val
145
191
forever (-1).
146
192
</ul><br>&nbsp;<br>
147
193
 
 
194
<a name=queue><font size=+2><b>queue
 
195
</b></font><br><font size=+1><tt>
 
196
Channel.queue(Sound) -> None
 
197
</tt></font><ul>
 
198
When you queue a sound on a channel, it will begin playing
 
199
immediately when the current playing sound finishes. Each
 
200
channel can only have a single Sound object queued. The
 
201
queued sound will only play when the current Sound finishes
 
202
naturally, not from another call to <a href=Sound.html#stop>stop()</a> or <a href=Sound.html#play>play()</a>.
 
203
<br>&nbsp;<br>
 
204
If there is no currently playing sound on this Channel
 
205
it will begin playback immediately.
 
206
<br>&nbsp;<br>
 
207
This will only work with SDL_mixer greater than version 1.2.3
 
208
</ul><br>&nbsp;<br>
 
209
 
 
210
<a name=set_endevent><font size=+2><b>set_endevent
 
211
</b></font><br><font size=+1><tt>
 
212
Channel.set_endevent([event_type]) -> None
 
213
</tt></font><ul>
 
214
When you set an endevent for a channel, that event type
 
215
will be put on the pygame event queue everytime a sound stops
 
216
playing on that channel. This is slightly different than the
 
217
music object end event, because this will trigger an event
 
218
anytime the music stops. If you call <a href=Sound.html#stop>stop()</a> or <a href=Sound.html#play>play()</a> on the
 
219
channel, it will fire an event. An event will also be fired when
 
220
playback switches to a queued Sound.
 
221
<br>&nbsp;<br>
 
222
Pass no argument to stop this channel from firing events
 
223
</ul><br>&nbsp;<br>
 
224
 
148
225
<a name=set_volume><font size=+2><b>set_volume
149
226
</b></font><br><font size=+1><tt>
150
 
Channel.set_volume(val) -> None
 
227
Channel.set_volume(val, [stereoval]) -> None
151
228
</tt></font><ul>
152
229
Sets the volume for the channel. The channel's volume level is
153
230
mixed with the volume for the active sound object. The value is
154
231
between 0.0 and 1.0.
 
232
<br>&nbsp;<br>
 
233
If mixer is using stereo, you can set the panning for audio
 
234
by supplying a volume for the left and right channels. If
 
235
SDL_mixer cannot set the panning, it will average the two
 
236
volumes. Panning requires SDL_mixer-1.2.1.
155
237
</ul><br>&nbsp;<br>
156
238
 
157
239
<a name=stop><font size=+2><b>stop