diff options
author | Max Kellermann <max@duempel.org> | 2013-01-10 09:30:01 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-10 10:12:54 +0100 |
commit | 06e0741a5293b1db2ef5f2b5778e3669f2dea70e (patch) | |
tree | c4087216ef0ff34a0854ff50dc259c0d13c41471 /src/PlayerControl.cxx | |
parent | 0b93445380ba39c13813e1a236b183883f5a54db (diff) | |
download | mpd-06e0741a5293b1db2ef5f2b5778e3669f2dea70e.tar.gz mpd-06e0741a5293b1db2ef5f2b5778e3669f2dea70e.tar.xz mpd-06e0741a5293b1db2ef5f2b5778e3669f2dea70e.zip |
PlayerControl: switch to the Mutex/Cond classes
Diffstat (limited to 'src/PlayerControl.cxx')
-rw-r--r-- | src/PlayerControl.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx index 857322c50..6246e0233 100644 --- a/src/PlayerControl.cxx +++ b/src/PlayerControl.cxx @@ -37,8 +37,6 @@ player_control::player_control(unsigned _buffer_chunks, :buffer_chunks(_buffer_chunks), buffered_before_play(_buffered_before_play), thread(nullptr), - mutex(g_mutex_new()), - cond(g_cond_new()), command(PLAYER_COMMAND_NONE), state(PLAYER_STATE_STOP), error_type(PLAYER_ERROR_NONE), @@ -55,9 +53,6 @@ player_control::~player_control() { if (next_song != nullptr) song_free(next_song); - - g_cond_free(cond); - g_mutex_free(mutex); } void @@ -76,7 +71,7 @@ static void player_command_wait_locked(struct player_control *pc) { while (pc->command != PLAYER_COMMAND_NONE) - g_cond_wait(pc->cond, pc->mutex); + pc->cond.wait(pc->mutex); } static void |