From 38b1a76138dc38edbdb541daaec62546307156ee Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 23 Jun 2022 21:17:04 +0200 Subject: [PATCH] btstack_audio_embedded: fix build --- CHANGELOG.md | 1 + platform/embedded/btstack_audio_embedded.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 188236e21..ae15d5151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - port: CMake build files in all windows-* ports allow to use Visual Studio 2022 +- embedded audio: mono audio is played on both channels if HAVE_HAL_AUDIO_SINK_STEREO_ONLY is defined ### Fixed diff --git a/platform/embedded/btstack_audio_embedded.c b/platform/embedded/btstack_audio_embedded.c index cbb0323b0..359ae68d2 100644 --- a/platform/embedded/btstack_audio_embedded.c +++ b/platform/embedded/btstack_audio_embedded.c @@ -71,7 +71,6 @@ static unsigned int output_buffer_samples; static volatile int input_buffer_ready; static volatile const int16_t * input_buffer_samples; static volatile uint16_t input_buffer_num_samples; -static unsigned int output_channels; static int source_active; static int sink_active; @@ -141,7 +140,7 @@ static int btstack_audio_embedded_sink_init( #ifdef HAVE_HAL_AUDIO_SINK_STEREO_ONLY // always use stereo from hal, duplicate samples if needed - output_duplicate_samples = num_channels != 2; + output_duplicate_samples = channels != 2; channels = 2; #endif