mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-29 05:40:50 +03:00
completed BT/AirPlay display
This commit is contained in:
@@ -628,11 +628,12 @@ static bool handle_rtsp(raop_ctx_t *ctx, int sock)
|
||||
|
||||
if (body && (p = strcasestr(body, "volume")) != NULL) {
|
||||
float volume;
|
||||
|
||||
|
||||
sscanf(p, "%*[^:]:%f", &volume);
|
||||
LOG_INFO("[%p]: SET PARAMETER volume %f", ctx, volume);
|
||||
volume = (volume == -144.0) ? 0 : (1 + volume / 30);
|
||||
success = ctx->cmd_cb(RAOP_VOLUME, volume);
|
||||
} else if (body && (p = strcasestr(body, "progress")) != NULL) {
|
||||
int start, current, stop = 0;
|
||||
|
||||
sscanf(p, "%*[^:]:%u/%u/%u", &start, ¤t, &stop);
|
||||
|
||||
@@ -108,7 +108,7 @@ static bool cmd_handler(raop_event_t event, ...) {
|
||||
break;
|
||||
}
|
||||
case RAOP_PROGRESS: {
|
||||
u32_t elapsed = va_arg(args, u32_t), duration = va_arg(args, u32_t);
|
||||
int elapsed = va_arg(args, int), duration = va_arg(args, int);
|
||||
displayer_timer(DISPLAYER_ELAPSED, elapsed, duration);
|
||||
chain = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user