mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
fix Spotify volume normalization
This commit is contained in:
@@ -406,9 +406,7 @@ static bool cspot_cmd_handler(cspot_event_t cmd, va_list args)
|
||||
case CSPOT_VOLUME: {
|
||||
u32_t volume = va_arg(args, u32_t);
|
||||
LOG_INFO("CSpot volume %u", volume);
|
||||
//volume = 65536 * powf(volume / 32768.0f, 3);
|
||||
// TODO spotify seems to volume normalize crazy high
|
||||
volume = 4096 * powf(volume / 32768.0f, 3);
|
||||
volume = 65536 * powf(volume / 65536.0f, 2);
|
||||
set_volume(volume, volume);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user