From 30a82076ba50a21c4df5fe4c46c8fc2ed25a7486 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Feb 2014 08:55:52 +0100 Subject: PlayerListener: new interface to replace GlobalEvents access --- src/PlayerThread.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/PlayerThread.cxx') diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index d90f281c6..9f342ad5d 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "PlayerThread.hxx" +#include "PlayerListener.hxx" #include "decoder/DecoderThread.hxx" #include "decoder/DecoderControl.hxx" #include "MusicPipe.hxx" @@ -31,7 +32,6 @@ #include "output/MultipleOutputs.hxx" #include "tag/Tag.hxx" #include "Idle.hxx" -#include "GlobalEvents.hxx" #include "util/Domain.hxx" #include "thread/Name.hxx" #include "Log.hxx" @@ -359,7 +359,7 @@ Player::WaitForDecoder() pc.Unlock(); /* call syncPlaylistWithQueue() in the main thread */ - GlobalEvents::Emit(GlobalEvents::PLAYLIST); + pc.listener.OnPlayerSync(); return true; } @@ -696,7 +696,7 @@ update_song_tag(PlayerControl &pc, DetachedSong &song, const Tag &new_tag) /* the main thread will update the playlist version when he receives this event */ - GlobalEvents::Emit(GlobalEvents::TAG); + pc.listener.OnPlayerTagModified(); /* notify all clients that the tag of the current song has changed */ @@ -1124,7 +1124,7 @@ player_task(void *arg) pc.Unlock(); do_play(pc, dc, buffer); - GlobalEvents::Emit(GlobalEvents::PLAYLIST); + pc.listener.OnPlayerSync(); pc.Lock(); break; -- cgit v1.2.3