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

Reset issue with audio #93

Closed
microbit-matt-hillsdon opened this issue Nov 2, 2022 · 4 comments
Closed

Reset issue with audio #93

microbit-matt-hillsdon opened this issue Nov 2, 2022 · 4 comments

Comments

@microbit-matt-hillsdon
Copy link
Contributor

microbit-matt-hillsdon commented Nov 2, 2022

from microbit import *
import music

music.pitch(185, 1000)
reset()

Click Reset repeatedly and quickly. Eventually you hit a large block of unexpected silence. The simulator then recovers.

This in and of itself isn't very likely in practice but it seems worth understanding what's going on as it's quite unexpected and could be the source of other bugs.

@microbit-matt-hillsdon
Copy link
Contributor Author

Something similar but without audio

from microbit import *
import random

print(random.randint(0, 100))
reset()

doesn't show any gap in output.

@microbit-matt-hillsdon
Copy link
Contributor Author

microbit-matt-hillsdon commented Nov 2, 2022

The actual reset call isn't needed, just the manual resets.

from microbit import *
import music

music.pitch(185, 1000)

Alternatively, this reproduces without manual resets:

from microbit import *
import music

music.pitch(185, 50)
reset()

@microbit-matt-hillsdon
Copy link
Contributor Author

This is unrelated to #91 - it reproduced with and without that fix.

@microbit-matt-hillsdon
Copy link
Contributor Author

This is fixed by the changes on #99. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant