Restore 'play sound effect' name
This commit is contained in:
		@@ -11,10 +11,10 @@
 | 
				
			|||||||
  "music.fromWAV": "Makes a sound bound to a buffer in WAV format.",
 | 
					  "music.fromWAV": "Makes a sound bound to a buffer in WAV format.",
 | 
				
			||||||
  "music.noteFrequency": "Get the frequency of a note.",
 | 
					  "music.noteFrequency": "Get the frequency of a note.",
 | 
				
			||||||
  "music.noteFrequency|param|name": "the note name, eg: Note.C",
 | 
					  "music.noteFrequency|param|name": "the note name, eg: Note.C",
 | 
				
			||||||
  "music.playSound": "Start playing a sound and don't wait for it to finish.",
 | 
					  "music.playSoundEffect": "Start playing a sound and don't wait for it to finish.",
 | 
				
			||||||
  "music.playSoundUntilDone": "Plays a sound",
 | 
					  "music.playSoundEffectUntilDone": "Plays a sound",
 | 
				
			||||||
  "music.playSoundUntilDone|param|sound": "the sound to play",
 | 
					  "music.playSoundEffectUntilDone|param|sound": "the sound to play",
 | 
				
			||||||
  "music.playSound|param|sound": "the sound to play",
 | 
					  "music.playSoundEffect|param|sound": "the sound to play",
 | 
				
			||||||
  "music.playTone": "Play a tone through the speaker for some amount of time.",
 | 
					  "music.playTone": "Play a tone through the speaker for some amount of time.",
 | 
				
			||||||
  "music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
 | 
					  "music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
 | 
				
			||||||
  "music.playTone|param|ms": "tone duration in milliseconds (ms)",
 | 
					  "music.playTone|param|ms": "tone duration in milliseconds (ms)",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,8 +24,8 @@
 | 
				
			|||||||
  "music.beat|block": "%fraction|beat",
 | 
					  "music.beat|block": "%fraction|beat",
 | 
				
			||||||
  "music.changeTempoBy|block": "change tempo by %value|(bpm)",
 | 
					  "music.changeTempoBy|block": "change tempo by %value|(bpm)",
 | 
				
			||||||
  "music.noteFrequency|block": "%note",
 | 
					  "music.noteFrequency|block": "%note",
 | 
				
			||||||
  "music.playSoundUntilDone|block": "play sound %sound|until done",
 | 
					  "music.playSoundEffectUntilDone|block": "play sound effect %sound|until done",
 | 
				
			||||||
  "music.playSound|block": "play sound %sound",
 | 
					  "music.playSoundEffect|block": "play sound effect %sound",
 | 
				
			||||||
  "music.playTone|block": "play tone|at %note=device_note|for %duration=device_beat",
 | 
					  "music.playTone|block": "play tone|at %note=device_note|for %duration=device_beat",
 | 
				
			||||||
  "music.rest|block": "rest|for %duration=device_beat",
 | 
					  "music.rest|block": "rest|for %duration=device_beat",
 | 
				
			||||||
  "music.ringTone|block": "ring tone|at %note=device_note",
 | 
					  "music.ringTone|block": "ring tone|at %note=device_note",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,9 +260,9 @@ namespace music {
 | 
				
			|||||||
     * Plays a sound
 | 
					     * Plays a sound
 | 
				
			||||||
     * @param sound the sound to play
 | 
					     * @param sound the sound to play
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    //% blockId=music_play_sound_until_done block="play sound %sound|until done"
 | 
					    //% blockId=music_play_sound_effect_until_done block="play sound effect %sound|until done"
 | 
				
			||||||
    //% weight=98
 | 
					    //% weight=98
 | 
				
			||||||
    export function playSoundUntilDone(sound: Sound) {
 | 
					    export function playSoundEffectUntilDone(sound: Sound) {
 | 
				
			||||||
        if (!sound) return;
 | 
					        if (!sound) return;
 | 
				
			||||||
        sound.play();
 | 
					        sound.play();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -281,9 +281,9 @@ namespace music {
 | 
				
			|||||||
     * Start playing a sound and don't wait for it to finish.
 | 
					     * Start playing a sound and don't wait for it to finish.
 | 
				
			||||||
     * @param sound the sound to play
 | 
					     * @param sound the sound to play
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    //% blockId=music_play_sound block="play sound %sound"
 | 
					    //% blockId=music_play_sound_effect block="play sound effect %sound"
 | 
				
			||||||
    //% weight=99
 | 
					    //% weight=99
 | 
				
			||||||
    export function playSound(sound: Sound) {
 | 
					    export function playSoundEffect(sound: Sound) {
 | 
				
			||||||
        control.runInBackground(() => sound.play());
 | 
					        control.runInBackground(() => sound.play());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user