mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 12:50:49 +03:00
sync with upstream/cspot
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
|
||||
#if __has_include("avahi-client/client.h")
|
||||
#include <avahi-client/client.h>
|
||||
|
||||
@@ -201,14 +201,16 @@ void SpircHandler::handleFrame(std::vector<uint8_t>& data) {
|
||||
break;
|
||||
}
|
||||
case MessageType_kMessageTypeReplace: {
|
||||
CSPOT_LOG(debug, "Got replace frame %d", playbackState->remoteTracks.size());
|
||||
CSPOT_LOG(debug, "Got replace frame %d",
|
||||
playbackState->remoteTracks.size());
|
||||
playbackState->syncWithRemote();
|
||||
|
||||
// 1st track is the current one, but update the position
|
||||
bool cleared = trackQueue->updateTracks(
|
||||
playbackState->remoteFrame.state.position_ms +
|
||||
ctx->timeProvider->getSyncedTimestamp() -
|
||||
playbackState->innerFrame.state.position_measured_at);
|
||||
playbackState->innerFrame.state.position_measured_at,
|
||||
false);
|
||||
|
||||
this->notify();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user