You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested with v2.1.2 and the lates recording&playback branch.
audio.stop doesn't work in this example:
frommicrobitimport*whileTrue:
ifbutton_a.is_pressed():
audio.play(Sound.HAPPY, wait=False)
# We can see here that the image is shown as soon as the sound starts playingdisplay.show(Image.HAPPY)
# But the sound plays to completionaudio.stop()
sleep(200)
sleep(100)
display.clear()
Simpler example in REPL (the next prompt >>> appears before the sound naturally ends playing):
I'm not sure what's wrong with the above code. It should play for 4 seconds. The microphone.record() is synchronous and records for 4 seconds, then the audio.play() will play the full sample, because microphone.stop_recording() has no effect on audio playback.
Tested with v2.1.2 and the lates recording&playback branch.
audio.stop
doesn't work in this example:Simpler example in REPL (the next prompt
>>>
appears before the sound naturally ends playing):Replacing the play call with
audio.play(audio.SoundEffect(duration=3000), wait=False)
doesn't work either.The text was updated successfully, but these errors were encountered: