-
-
Notifications
You must be signed in to change notification settings - Fork 309
Mixing audio from SD and from bluetooth sources #2182
-
For my project I would like to achieve the following:
- A music source from an SD card that plays all songs from a (or several) directory on the SD
- An occasional announcement that comes from a bluetooth source that can either interrupt or mix with the music.
I have the code running for the SD card music source using an ESP32-S3 but now would like to add the bluetooth source.
Firstly, which version of ESP32? I gather the S3 which has PSRAM does not support A2DP.
The ESP32-audioI2S says it only works on boards with PSRAM so which ESP32 board do I need?
Alternatively I guess I could use an external bluetooth board that has an I2S output and feed that to the ESP32.
Then what about mixing or selecting the source to pipe to the output?
Is it possible to detect when a source is active?
Or is the simple fact that there is nothing coming in on a source sufficient that it will not affect the output if the two are continually mixed?
I hope someone can guide me in the right direction.
Beta Was this translation helpful? Give feedback.
All reactions
As the documentation clearly states, only a regular ESP32 support Classic Bluetooth. All other variants only support BLE!
Since Espressif plans to remove the A2DP functionality from Arduino, using an external module is a good choise.
Also have a look at the Wiki Documentation: Analysing Audio: Determining the Volume. You can build a switch using the VolumeMeter and switch the mixer on when you get some signal and switch it off after a defined period w/o volume.
I would recommend to do the mixing only when it is needed.
Replies: 1 comment 1 reply
-
As the documentation clearly states, only a regular ESP32 support Classic Bluetooth. All other variants only support BLE!
Since Espressif plans to remove the A2DP functionality from Arduino, using an external module is a good choise.
Also have a look at the Wiki Documentation: Analysing Audio: Determining the Volume. You can build a switch using the VolumeMeter and switch the mixer on when you get some signal and switch it off after a defined period w/o volume.
I would recommend to do the mixing only when it is needed.
Beta Was this translation helpful? Give feedback.
All reactions
-
I have added the new AudioInputMonitor class.
Beta Was this translation helpful? Give feedback.