summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-06-27 13:33:57 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-06-27 13:33:57 +0000
commit6a58c9d7b115eb433906baf2bdb15f3d012a262e (patch)
tree1e32b926cc8de8107dd147b7425727c8e1a6ac79
parent90f730ca714fb53f47ee16be46fcb06bd98d53ed (diff)
downloadxine-lib-6a58c9d7b115eb433906baf2bdb15f3d012a262e.tar.gz
xine-lib-6a58c9d7b115eb433906baf2bdb15f3d012a262e.tar.bz2
only issue the warning on unavailable audio devices under the condition
(in_buf && in_buf->num_frames), otherwise, the dummy packet send by ao_exit() to wake up the audio out loop can trigger this message (because it has an undefined buf->format.rate, which, when 0 causes driver->open() to fail and the message gets emitted) we also send the message to the streams attached to this audio out only, not to all streams known to the engine CVS patchset: 6757 CVS date: 2004/06/27 13:33:57
-rw-r--r--src/xine-engine/audio_out.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 9f20efe00..83401599b 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.180 2004/06/19 20:07:15 mroi Exp $
+ * $Id: audio_out.c,v 1.181 2004/06/27 13:33:57 mroi Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -1002,19 +1002,21 @@ static void *ao_loop (void *this_gen) {
delay = 0;
pthread_mutex_unlock( &this->driver_lock );
- xprintf(this->xine, XINE_VERBOSITY_LOG,
- _("audio_out: delay calculation impossible with an unavailable audio device\n"));
+
+ if (in_buf && in_buf->num_frames) {
+ xprintf(this->xine, XINE_VERBOSITY_LOG,
+ _("audio_out: delay calculation impossible with an unavailable audio device\n"));
- pthread_mutex_lock(&this->xine->streams_lock);
- for (stream = xine_list_first_content(this->xine->streams);
- stream; stream = xine_list_next_content(this->xine->streams))
- {
- _x_message (stream, XINE_MSG_AUDIO_OUT_UNAVAILABLE, NULL);
- /* This is necessary for the message to get to the front-end at some
- * point before another message is sent */
- sched_yield();
+ pthread_mutex_lock(&this->streams_lock);
+ for (stream = xine_list_first_content(this->streams);
+ stream; stream = xine_list_next_content(this->streams)) {
+ _x_message (stream, XINE_MSG_AUDIO_OUT_UNAVAILABLE, NULL);
+ /* This is necessary for the message to get to the front-end at some
+ * point before another message is sent */
+ sched_yield();
+ }
+ pthread_mutex_unlock(&this->streams_lock);
}
- pthread_mutex_unlock(&this->xine->streams_lock);
}
cur_time = this->clock->get_current_time (this->clock);