Closed
Description
@dpgeorge tagging you here as we just discussed this.
Recent CODAL versions bring the microphone up automatically with the uBit audio pipeline.
Therefore, I think this line:
... will cause the audio pipeline to to come up, which causes the mic to turn on
Some options would be
- defer the message bus listening until the first time that the user requests some form of audio event (of course, this means we'll likely miss the first time they ask for one) - eg in
microbit_hal_microphone_init
- explicitly turn off the microphone after that initialisation: https://github.com/lancaster-university/codal-microbit-v2/blob/b587d9c26f5e93a2054ba8b36a6cdcc27b234419/source/MicroBitAudio.cpp#L113
In looking over the code @JohnVidler and I noticed that
is perhaps doing a lot more than it should these days, as we have a LevelDetector in uBit now (which gives us consistent parameters across MakeCode and MicroPython, by design, but I guess right now not in reality).I'll let @JohnVidler chime in on what the right approach is here!
Metadata
Metadata
Assignees
Labels
No labels