changeset 3158:92717dcb09f6 trunk

Send a message from the monitor thread to the main thread for audio errors, like we do with eof condition.
author William Pitcock <nenolod@atheme-project.org>
date Mon, 23 Jul 2007 19:35:59 -0500
parents f9d34bc5079f
children a2d552ea48f0
files src/audacious/playback.c src/audacious/playback.h
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playback.c	Mon Jul 23 19:33:59 2007 -0500
+++ b/src/audacious/playback.c	Mon Jul 23 19:35:59 2007 -0500
@@ -66,6 +66,12 @@
     event_queue("playback eof", playlist_get_active());
 }
 
+void
+playback_error(void)
+{
+    event_queue("playback audio error", NULL);
+}
+
 gint
 playback_get_time(void)
 {
@@ -244,8 +250,10 @@
 
     entry->decoder->play_file(playback);
 
-    if (ip_data.playing)
+    if (!playback->error && ip_data.playing)
         playback_eof();
+    else if (playback->error)
+        playback_error();
 
     return NULL;
 }
--- a/src/audacious/playback.h	Mon Jul 23 19:33:59 2007 -0500
+++ b/src/audacious/playback.h	Mon Jul 23 19:35:59 2007 -0500
@@ -37,5 +37,6 @@
 void playback_seek(gint time);
 void playback_seek_relative(gint offset);
 void playback_eof(void);
+void playback_error(void);
 
 #endif