Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio-recording extension overrides set built-in speak <OFF> and set volume #6094

Open
martinwork opened this issue Feb 15, 2025 · 2 comments

Comments

@martinwork
Copy link
Contributor

Describe the bug

The audio-recording extension turns on the built-in speaker and sets the volume high for speaker and audio pin (e.g. earphone)
https://github.com/microsoft/pxt-microbit/blob/master/libs/audio-recording/recording.cpp#L55

Workaround: set sample rate to 11000 before adjusting speaker and volume, or adjust after recording.

To Reproduce
Steps to reproduce the behavior:

  1. Open https://makecode.microbit.org/_CYtDeAAMMX1p
  2. Send to micro:bit
  3. Press A
  4. Press B
  5. Hear speaker

Expected behavior
Able to turn off built-in speaker and adjust volume.

Screenshots

Image

micro:bit version (please complete the following information):
V2

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 132
@microbit-carlos
Copy link
Collaborator

Thanks @martinwork! Do you think this could be an issue in the CODAL layer? Would you be able to create a C++ to check and open an issue there as well if it's the case?

@martinwork
Copy link
Contributor Author

@microbit-carlos The cause is in the extension

uBit.audio.mixer.setVolume(1000);

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

No branches or pull requests

2 participants