Commits

illume  committed ade936f

doc changes for fade_ms argument to Sound.play and Channel.play.

  • Participants
  • Parent commits 2e3beaa

Comments (0)

Files changed (2)

File docs/ref/mixer.html

 <a name="Sound.play">
 <big><b>Sound.play</big></b><br><ul>
   <i>begin sound playback</i><br>
-  <tt>Sound.play(loops=0, maxtime=0): return Channel</tt><br>
+  <tt>Sound.play(loops=0, maxtime=0, fade_ms=0): return Channel</tt><br>
 <p>Begin playback of the Sound <tt>(i.e.</tt>, on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary. </p>
 <p>The loops argument controls how many times the sample will be repeated after being played the first time. <tt>A</tt> value of 5 means that the sound will be played once, then repeated five times, and so is played a total of six times. The default value (zero) means the Sound is not repeated, and so is only played once. If loops is set to -1 the Sound will loop indefinitely (though you can still call stop() to stop it). </p>
 <p>The maxtime argument can be used to stop playback after a given number of milliseconds. </p>
+<p>The fade_ms argument will make the sound start playing at 0 volume and fade up to full volume over the time given. The sample may end before the fade-in is complete. </p>
 <p>This returns the Channel object for the channel that was selected. </p>
 <!--COMMENTS:Sound.play--> &nbsp;<br> 
 <br></ul>
 <a name="Channel.play">
 <big><b>Channel.play</big></b><br><ul>
   <i>play a Sound on a specific Channel</i><br>
-  <tt>Channel.play(Sound, loops=0, time=0): return None</tt><br>
+  <tt>Channel.play(Sound, loops=0, maxtime=0, fade_ms=0): return None</tt><br>
 <p>This will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped. </p>
 <p>The loops argument has the same meaning as in <tt>Sound.play():</tt> it is the number of times to repeat the sound after the first time. If it is 3, the sound will be played 4 times (the first time, then three more). If loops is -1 then the playback will repeat indefinitely. </p>
-<p>As in <tt><a href="mixer.html#Sound.play">Sound.play</a> - <font size=-1>begin sound playback</font></tt>, the time argument can be used to stop playback of the Sound after a given number of milliseconds. </p>
+<p>As in <tt><a href="mixer.html#Sound.play">Sound.play</a> - <font size=-1>begin sound playback</font></tt>, the maxtime argument can be used to stop playback of the Sound after a given number of milliseconds. </p>
+<p>As in <tt><a href="mixer.html#Sound.play">Sound.play</a> - <font size=-1>begin sound playback</font></tt>, the fade_ms argument can be used fade in the sound. </p>
 <!--COMMENTS:Channel.play--> &nbsp;<br> 
 <br></ul>
 

File src/pygamedocs.h

 
 #define DOC_PYGAMEMIXERSOUND "pygame.mixer.Sound(filename): return Sound\npygame.mixer.Sound(buffer): return Sound\npygame.mixer.Sound(object): return Sound\nCreate a new Sound object from a file"
 
-#define DOC_SOUNDPLAY "Sound.play(loops=0, maxtime=0): return Channel\nbegin sound playback"
+#define DOC_SOUNDPLAY "Sound.play(loops=0, maxtime=0, fade_ms=0): return Channel\nbegin sound playback"
 
 #define DOC_SOUNDSTOP "Sound.stop(): return None\nstop sound playback"
 
 
 #define DOC_PYGAMEMIXERCHANNEL "pygame.mixer.Channel(id): return Channel\nCreate a Channel object for controlling playback"
 
-#define DOC_CHANNELPLAY "Channel.play(Sound, loops=0, time=0): return None\nplay a Sound on a specific Channel"
+#define DOC_CHANNELPLAY "Channel.play(Sound, loops=0, maxtime=0, fade_ms=0): return None\nplay a Sound on a specific Channel"
 
 #define DOC_CHANNELSTOP "Channel.stop(): return None\nstop playback on a Channel"