max volume for AP/BT - release

This commit is contained in:
Philippe G
2020-07-28 18:53:10 -07:00
parent f4af5cfda0
commit 4f90002c99

View File

@@ -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);
break;
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);
set_volume(volume, volume);
break;
@@ -282,7 +282,7 @@ static bool raop_sink_cmd_handler(raop_event_t event, va_list args)
float volume = va_arg(args, double);
LOG_INFO("Volume[0..1] %0.4f", volume);
volume = 65536 * powf(volume, 3);
set_volume((u16_t) volume, (u16_t) volume);
set_volume(volume, volume);
break;
}
default: