aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerControl.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
committerMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
commitba161ec572b98d3bcf9f735ff122133319fe896a (patch)
treea211690e3a8b7fce1fb6db540228122bead1f2bc /src/PlayerControl.cxx
parent43f613d9be9aa2953dcfc0aacfbdfb56d5d1a708 (diff)
downloadmpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.gz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.xz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.zip
song: convert header to C++
Diffstat (limited to 'src/PlayerControl.cxx')
-rw-r--r--src/PlayerControl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx
index 790abcd50..357cdfc17 100644
--- a/src/PlayerControl.cxx
+++ b/src/PlayerControl.cxx
@@ -20,7 +20,7 @@
#include "config.h"
#include "PlayerControl.hxx"
#include "Idle.hxx"
-#include "song.h"
+#include "Song.hxx"
#include "DecoderControl.hxx"
#include "Main.hxx"
@@ -30,7 +30,7 @@
#include <stdio.h>
static void
-pc_enqueue_song_locked(struct player_control *pc, struct song *song);
+pc_enqueue_song_locked(struct player_control *pc, Song *song);
player_control::player_control(unsigned _buffer_chunks,
unsigned _buffered_before_play)
@@ -59,7 +59,7 @@ player_control::player_control(unsigned _buffer_chunks,
player_control::~player_control()
{
if (next_song != nullptr)
- song_free(next_song);
+ next_song->Free();
}
static void
@@ -88,7 +88,7 @@ player_command(struct player_control *pc, enum player_command cmd)
}
void
-player_control::Play(struct song *song)
+player_control::Play(Song *song)
{
assert(song != NULL);
@@ -253,7 +253,7 @@ player_control::GetErrorMessage() const
}
static void
-pc_enqueue_song_locked(struct player_control *pc, struct song *song)
+pc_enqueue_song_locked(struct player_control *pc, Song *song)
{
assert(song != NULL);
assert(pc->next_song == NULL);
@@ -263,7 +263,7 @@ pc_enqueue_song_locked(struct player_control *pc, struct song *song)
}
void
-player_control::EnqueueSong(struct song *song)
+player_control::EnqueueSong(Song *song)
{
assert(song != NULL);
@@ -273,14 +273,14 @@ player_control::EnqueueSong(struct song *song)
}
bool
-player_control::Seek(struct song *song, float seek_time)
+player_control::Seek(Song *song, float seek_time)
{
assert(song != NULL);
Lock();
if (next_song != nullptr)
- song_free(next_song);
+ next_song->Free();
next_song = song;
seek_where = seek_time;