mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 04:27:12 +03:00
max volume for AP/BT - release
This commit is contained in:
@@ -145,7 +145,7 @@ static bool bt_sink_cmd_handler(bt_sink_cmd_t cmd, va_list args)
|
|||||||
LOG_INFO("Setting BT sample rate %u", output.next_sample_rate);
|
LOG_INFO("Setting BT sample rate %u", output.next_sample_rate);
|
||||||
break;
|
break;
|
||||||
case BT_SINK_VOLUME: {
|
case BT_SINK_VOLUME: {
|
||||||
u16_t volume = (u16_t) va_arg(args, u32_t);
|
u32_t volume = va_arg(args, u32_t);
|
||||||
volume = 65536 * powf(volume / 128.0f, 3);
|
volume = 65536 * powf(volume / 128.0f, 3);
|
||||||
set_volume(volume, volume);
|
set_volume(volume, volume);
|
||||||
break;
|
break;
|
||||||
@@ -282,7 +282,7 @@ static bool raop_sink_cmd_handler(raop_event_t event, va_list args)
|
|||||||
float volume = va_arg(args, double);
|
float volume = va_arg(args, double);
|
||||||
LOG_INFO("Volume[0..1] %0.4f", volume);
|
LOG_INFO("Volume[0..1] %0.4f", volume);
|
||||||
volume = 65536 * powf(volume, 3);
|
volume = 65536 * powf(volume, 3);
|
||||||
set_volume((u16_t) volume, (u16_t) volume);
|
set_volume(volume, volume);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user