mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
update CSpot + clear audio buffer when changing track
This commit is contained in:
@@ -14,17 +14,17 @@
|
||||
#include "SpotifyTrack.h"
|
||||
#include "AudioSink.h"
|
||||
#include <mutex>
|
||||
#include "Queue.h"
|
||||
#include "Task.h"
|
||||
|
||||
class Player : public bell::Task {
|
||||
private:
|
||||
std::shared_ptr<MercuryManager> manager;
|
||||
std::shared_ptr<SpotifyTrack> currentTrack = nullptr;
|
||||
SpotifyTrack *currentTrack = nullptr;
|
||||
SpotifyTrack *nextTrack = nullptr;
|
||||
std::shared_ptr<AudioSink> audioSink;
|
||||
std::mutex loadTrackMutex;
|
||||
// @TODO: Use some actual structure here
|
||||
bell::Queue<std::shared_ptr<SpotifyTrack>> trackQueue;
|
||||
WrappedMutex nextTrackMutex;
|
||||
WrappedMutex currentTrackMutex;
|
||||
void runTask();
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user