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