From 6d9eaf4109308e8efa0dff48228c4534f2a3a06e Mon Sep 17 00:00:00 2001 From: Philippe G Date: Thu, 25 Feb 2021 06:10:03 -0800 Subject: [PATCH] add balance option - release --- components/squeezelite/embedded.h | 2 +- components/squeezelite/output_pack.c | 2 +- components/squeezelite/slimproto.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/squeezelite/embedded.h b/components/squeezelite/embedded.h index 457fb310..f4db7710 100644 --- a/components/squeezelite/embedded.h +++ b/components/squeezelite/embedded.h @@ -42,7 +42,7 @@ typedef unsigned long long u64_t; #define PLAYER_ID custom_player_id extern u8_t custom_player_id; -#define BASE_CAP "Model=squeezeesp32,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION +#define BASE_CAP "Model=squeezeesp32,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Balance=1,Firmware=" VERSION // to force some special buffer attribute #define EXT_BSS __attribute__((section(".ext_ram.bss"))) diff --git a/components/squeezelite/output_pack.c b/components/squeezelite/output_pack.c index c886f104..fb137f6a 100644 --- a/components/squeezelite/output_pack.c +++ b/components/squeezelite/output_pack.c @@ -57,7 +57,7 @@ void _scale_and_pack_frames(void *outputptr, s32_t *inputptr, frames_t cnt, s32_ gainL &= ~MONO_FLAG; gainR &= ~MONO_FLAG; while (count--) { // use 64 bits integer for purists but should really not care - *ptr = *(ptr + 1) = ((s64_t) gain(gainL, *ptr) + (s64_t) gain(gainR, *(ptr + 1))) / 2; + *ptr = *(ptr + 1) = ((s64_t) *ptr + (s64_t) *(ptr + 1)) / 2; ptr += 2; } } else if (gainL & MONO_FLAG) { diff --git a/components/squeezelite/slimproto.c b/components/squeezelite/slimproto.c index 902d71b2..4961c507 100644 --- a/components/squeezelite/slimproto.c +++ b/components/squeezelite/slimproto.c @@ -122,7 +122,7 @@ void send_packet(u8_t *packet, size_t len) { static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t mac[6]) { #ifndef BASE_CAP -#define BASE_CAP "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION +#define BASE_CAP "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Balance=1,Firmware=" VERSION #endif #define SSL_CAP "CanHTTPS=1" const char *base_cap;