The function player_command() inherited the busy-waiting algorithm from the old code; throw in a wait_main_task() to do idle waiting. ---
src/player.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/player.c b/src/player.c index 8f3f6a6..08ad940 100644 --- a/src/player.c +++ b/src/player.c @@ -97,9 +97,10 @@ static void set_current_song(Song *song) static void player_command(enum player_command cmd) { pc.command = cmd; - while (pc.command != PLAYER_COMMAND_NONE) - /* FIXME: _nb() variant is probably wrong here, and everywhere... */ + while (pc.command != PLAYER_COMMAND_NONE) { notify_signal(&pc.notify); + wait_main_task(); + } } void player_command_finished() ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team