diff --git a/software/firmware/source/SoftRF/src/driver/Bluetooth.cpp b/software/firmware/source/SoftRF/src/driver/Bluetooth.cpp index 9a6e136d4..63f2cc03f 100644 --- a/software/firmware/source/SoftRF/src/driver/Bluetooth.cpp +++ b/software/firmware/source/SoftRF/src/driver/Bluetooth.cpp @@ -993,6 +993,14 @@ IODev_ops_t nRF52_Bluetooth_ops = { #include "Bluetooth.h" #include "Battery.h" +#if defined(ENABLE_BT_VOICE) +#include "AudioTools.h" +#include "BTstack_A2DP.h" + +SineWaveGenerator sineWave(32000); +GeneratedSoundStream in(sineWave); +#endif /* ENABLE_BT_VOICE */ + static bool _running = false; static mutex_t _mutex; static bool _overflow = false; @@ -1688,6 +1696,11 @@ static void CYW43_Bluetooth_setup() } break; case BLUETOOTH_A2DP_SOURCE: +#if defined(ENABLE_BT_VOICE) + A2DPSource.setVolume(50); + A2DPSource.begin(in); +#endif + break; case BLUETOOTH_NONE: default: break; diff --git a/software/firmware/source/SoftRF/src/platform/RP2040.h b/software/firmware/source/SoftRF/src/platform/RP2040.h index f7d467e99..ff5f1ff28 100644 --- a/software/firmware/source/SoftRF/src/platform/RP2040.h +++ b/software/firmware/source/SoftRF/src/platform/RP2040.h @@ -232,6 +232,7 @@ struct rst_info { extern WebServer server; /* Experimental */ #define ENABLE_PROL +//#define ENABLE_BT_VOICE #else #define EXCLUDE_WIFI #define EXCLUDE_BLUETOOTH diff --git a/software/firmware/source/SoftRF/src/ui/Web.cpp b/software/firmware/source/SoftRF/src/ui/Web.cpp index d75dfe517..3c7f81610 100644 --- a/software/firmware/source/SoftRF/src/ui/Web.cpp +++ b/software/firmware/source/SoftRF/src/ui/Web.cpp @@ -354,7 +354,7 @@ void handleSettings() { \ \ \ -\ +\ \ \ "),