microsoft / pxt-microbit

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

Allow simulator to behave correctly when used with audio play/record extensions using new CODAL pipeline #4610

Closed jaustin closed 1 year ago

jaustin commented 2 years ago

Is your feature request related to a problem? Please describe.

There's a new audio pipeline going into CODAL that will allow, amongst other things, playback and record of audio, and some more dynamic behaviour for the audio pipeline. For example, if a user 'listens' for 3 seconds to store a clip in RAM, the microphone will only be powered for those 3 seconds, and consequently the micro:bits microphone LED will only be on during that time.

As yet, the simulator doesn't implement anything relating to these new CODAL APIs and the recording LED, nor the ability to record sound.

We're developing these APIs as an extension, but would like the simulator to do 'the right thing' so users don't get vastly different experiences on the simulator and the device.

Describe the solution you'd like

Ultimately, I'd like the simulator to be able to record audio and play it back. I understand that may be a longer term goal.

However, in the short term, it may suffice for the simulator's microphone LED to activate and deactivate at appropriate times.

Describe alternatives you've considered

@riknoll @johnvidler has more information on the pipeline stuff.

jaustin commented 2 years ago

@riknoll some of the team had noticed this https://github.com/microsoft/pxt/pull/8773 and wondered whether that gives us an easy to use thing for this?

abchatra commented 1 year ago

This is asking for simulator support for record playback api