aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerControl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PlayerControl.cxx')
-rw-r--r--src/PlayerControl.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx
index 96a221f6d..9ba77b32c 100644
--- a/src/PlayerControl.cxx
+++ b/src/PlayerControl.cxx
@@ -53,6 +53,9 @@ player_control::~player_control()
{
if (next_song != nullptr)
next_song->Free();
+
+ if (tagged_song != nullptr)
+ tagged_song->Free();
}
void
@@ -201,6 +204,25 @@ player_control::ClearError()
}
void
+player_control::LockSetTaggedSong(const Song &song)
+{
+ Lock();
+ if (tagged_song != nullptr)
+ tagged_song->Free();
+ tagged_song = song.DupDetached();
+ Unlock();
+}
+
+void
+player_control::ClearTaggedSong()
+{
+ if (tagged_song != nullptr) {
+ tagged_song->Free();
+ tagged_song = nullptr;
+ }
+}
+
+void
player_control::EnqueueSong(Song *song)
{
assert(song != nullptr);