Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing a microbit.Sound or audio.SoundEffect crashes beta.2 #124

Closed
microbit-carlos opened this issue Sep 16, 2022 · 3 comments · Fixed by #125
Closed

Playing a microbit.Sound or audio.SoundEffect crashes beta.2 #124

microbit-carlos opened this issue Sep 16, 2022 · 3 comments · Fixed by #125

Comments

@microbit-carlos
Copy link
Contributor

To replicate:

from microbit import *

audio.play(audio.SoundEffect())
display.show("A")
from microbit import *

audio.play(Sound.HAPPY)
display.show("A")

In both cases the sound will play, but it will get stuck playing the last tone and play that indefinitely, never reaching the line to display "A".

Looks like it was introduced by this CODAL commit: lancaster-university/codal-microbit-v2@31095d5

More info in:

@microbit-carlos
Copy link
Contributor Author

To have a working MicroPython hex for the Python Editor, we'll see tomorrow to maybe create a new CODAL tag with the commit reverted, or maybe go back in MicroPython to CODAL v0.2.40.

@dpgeorge
Copy link
Collaborator

This will block #118, #119, #122 (which require features from CODAL 0.2.40).

microbit-carlos added a commit that referenced this issue Sep 16, 2022
Only change is:
- Removes a small delay in the emoji synth to allow HLLs to run
  correctly

This is to fix:
#124
@microbit-carlos
Copy link
Contributor Author

microbit-carlos commented Sep 16, 2022

Okay, we've got a hotfix patch to resolve this and I'll release beta.3 right away.

The commit reverted was to solve a issue with the uBit.audio.soundExpressions.play() function returning before the sound finished playing (about 15ish ms or so), so it should be safe to revert:

Thanks @JohnVidler!

microbit-carlos added a commit that referenced this issue Sep 16, 2022
Only change is:
- Removes a small delay in the emoji synth to allow HLLs to run
  correctly

This is to fix:
#124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants