-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Milestone
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:
| uBit.messageBus.listen(DEVICE_ID_SYSTEM_LEVEL_DETECTOR, DEVICE_EVT_ANY, level_detector_event_handler); |
... 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
| void microbit_hal_microphone_init(void) { |
I'll let @JohnVidler chime in on what the right approach is here!
Metadata
Metadata
Assignees
Labels
No labels