diff options
Diffstat (limited to 'src/output_all.c')
-rw-r--r-- | src/output_all.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/output_all.c b/src/output_all.c index 4e0b2eb22..7f4694a8b 100644 --- a/src/output_all.c +++ b/src/output_all.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2010 The Music Player Daemon Project + * Copyright (C) 2003-2011 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ #include "buffer.h" #include "player_control.h" #include "mpd_error.h" +#include "notify.h" #ifndef NDEBUG #include "chunk.h" @@ -100,7 +101,7 @@ audio_output_config_count(void) } void -audio_output_all_init(void) +audio_output_all_init(struct player_control *pc) { const struct config_param *param = NULL; unsigned int i; @@ -121,7 +122,7 @@ audio_output_all_init(void) /* only allow param to be NULL if there just one audioOutput */ assert(param || (num_audio_outputs == 1)); - if (!audio_output_init(output, param, &error)) { + if (!audio_output_init(output, param, pc, &error)) { if (param != NULL) MPD_ERROR("line %i: %s", param->line, error->message); @@ -460,17 +461,17 @@ audio_output_all_check(void) } bool -audio_output_all_wait(unsigned threshold) +audio_output_all_wait(struct player_control *pc, unsigned threshold) { - player_lock(); + player_lock(pc); if (audio_output_all_check() < threshold) { - player_unlock(); + player_unlock(pc); return true; } - player_wait(); - player_unlock(); + player_wait(pc); + player_unlock(pc); return audio_output_all_check() < threshold; } |