microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
710 stars 589 forks source link

Sound hangs if tones are played too quickly #4862

Closed martinwork closed 1 year ago

martinwork commented 1 year ago

Describe the bug Reported in support ticket https://support.microbit.org/helpdesk/tickets/57130 (private)

Sound stops on micro:bit V2 if tones are played too quickly. This project demonstrates the error: https://makecode.microbit.org/_ThWV01bxEe8r. The heart keeps beating, but sound stops after 3 tones.

If the pause is increased to 110ms, it's OK.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://makecode.microbit.org/_ThWV01bxEe8r'
  2. Download to micro:bit V2
  3. Hear error

Expected behavior Tones keep playing

Screenshots image

micro:bit version (please complete the following information): tested with v2.21

Desktop (please complete the following information):

thsparks commented 1 year ago

I can repro this on the live site, but not with the new sound blocks, so I think this was fixed as a side effect of https://github.com/microsoft/pxt-microbit/pull/5123