Skip to content

Conversation

@microbit-robert
Copy link
Contributor

Closes #70.

@netlify
Copy link

netlify bot commented Sep 22, 2022

Deploy Preview for distracted-dubinsky-fd8a42 ready!

Name Link
🔨 Latest commit 6954691
🔍 Latest deploy log https://app.netlify.com/sites/distracted-dubinsky-fd8a42/deploys/632c5456711c9a000813df4e
😎 Deploy Preview https://deploy-preview-71--distracted-dubinsky-fd8a42.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines -142 to -146
if (this.context) {
this.context.close();
this.context = undefined;
this.oscillator = undefined;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously thrown away when the board was stopped, but not re-initialised on a soft reboot. This is now thrown away when stop() is called.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this mean we keep playing sounds? Would it be better to close/reinit the audio?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be the case. It may be safer, but we need to find a way to pass wrapped._microbit_hal_audio_ready_callback and wrapped._microbit_hal_audio_speech_ready_callback into an init function that is called on a soft reboot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this approach if there aren't practical issues. It might be safer in other ways as the audio context creation will always tied to a user event so less likely to hit browser issues.

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

Successfully merging this pull request may close these issues.

Simulator error on soft reboot

3 participants