Skip to content

Commit

Permalink
Configure firmware to use Opus codec when sending audio packets (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
francip authored Jul 20, 2024
2 parents 6a5a2ce + 0e6ba97 commit 8b40d89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion firmware/firmware_v1.0/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ CONFIG_BT_AUTO_PHY_UPDATE=y
# CONFIG_UART_CONSOLE=n
# CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=2048
# CONFIG_RTT_CONSOLE=y
# CONFIG_LOG_BACKEND_RTT=y
# CONFIG_LOG_BACKEND_RTT=y
CONFIG_CODEC_OPUS=y
8 changes: 4 additions & 4 deletions firmware/firmware_v1.0/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#define PDM_PWR_PIN NRF_GPIO_PIN_MAP(1, 10)

// Codecs
#define CODEC_PCM 1
// #define CODEC_PCM 1
// #define CODEC_MU_LAW 1
// #define CODEC_OPUS 1
#define CODEC_OPUS 1

// Codec packages
#if CODEC_PCM | CODEC_MU_LAW
Expand All @@ -34,9 +34,9 @@
#define CODEC_PACKAGE_SAMPLES 160
#define CODEC_OUTPUT_MAX_BYTES CODEC_PACKAGE_SAMPLES * 2 // Let's assume that 16bit is enough
#define CODEC_OPUS_APPLICATION OPUS_APPLICATION_RESTRICTED_LOWDELAY
#define CODEC_OPUS_BITRATE 64000
#define CODEC_OPUS_BITRATE 32000
#define CODEC_OPUS_VBR 1 // Or 1
#define CODEC_OPUS_COMPLEXITY 8
#define CODEC_OPUS_COMPLEXITY 3
#endif
#define CONFIG_OPUS_MODE CONFIG_OPUS_MODE_CELT

Expand Down

0 comments on commit 8b40d89

Please sign in to comment.