player/Control: convert to class

This commit is contained in:
Max Kellermann
2018-09-21 18:00:23 +02:00
parent e5d1ac0bd0
commit e3142312bb
7 changed files with 37 additions and 14 deletions

View File

@@ -91,7 +91,7 @@ playlist::SongStarted()
inline void
playlist::QueuedSongStarted(PlayerControl &pc)
{
assert(pc.next_song == nullptr);
assert(!pc.HasNextSong());
assert(queued >= -1);
assert(current >= 0);
@@ -197,7 +197,7 @@ playlist::SyncWithPlayer(PlayerControl &pc)
pc.Lock();
const PlayerState pc_state = pc.GetState();
bool pc_has_next_song = pc.next_song != nullptr;
bool pc_has_next_song = pc.HasNextSong();
pc.Unlock();
if (pc_state == PlayerState::STOP)
@@ -213,7 +213,7 @@ playlist::SyncWithPlayer(PlayerControl &pc)
QueuedSongStarted(pc);
pc.Lock();
pc_has_next_song = pc.next_song != nullptr;
pc_has_next_song = pc.HasNextSong();
pc.Unlock();
/* make sure the queued song is always set (if

View File

@@ -25,7 +25,7 @@
enum TagType : uint8_t;
struct Tag;
struct PlayerControl;
class PlayerControl;
class DetachedSong;
class Database;
class SongLoader;

View File

@@ -27,7 +27,7 @@
struct StateFileConfig;
struct playlist;
struct PlayerControl;
class PlayerControl;
class TextFile;
class BufferedOutputStream;
class SongLoader;