diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-12-10 20:51:01 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-12-10 20:51:01 +0000 |
commit | 165eb16d8d0545d4ca431ae1d570fa2b79861242 (patch) | |
tree | 724614e4435e3d65829a8a6227bf5463ac00f19d | |
parent | aa6a734a5bce28ebece370f04d23e2cf5b5bb75f (diff) | |
download | xine-lib-165eb16d8d0545d4ca431ae1d570fa2b79861242.tar.gz xine-lib-165eb16d8d0545d4ca431ae1d570fa2b79861242.tar.bz2 |
i guess this xprintf must be enclosed in a test
CVS patchset: 5889
CVS date: 2003/12/10 20:51:01
-rw-r--r-- | src/xine-engine/audio_out.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 8797dd3d6..f49186860 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.156 2003/12/07 15:34:30 f1rmb Exp $ + * $Id: audio_out.c,v 1.157 2003/12/10 20:51:01 miguelfreitas Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -1071,15 +1071,16 @@ static void *ao_loop (void *this_gen) { pthread_mutex_lock( &this->driver_lock ); result = this->driver->write (this->driver, out_buf->mem, out_buf->num_frames ); pthread_mutex_unlock( &this->driver_lock ); - /* FIXME: USB device unplugged. - * We should get the card into a closed state here, that involves closing - * the PCM as well as the MIXER. - * Maybe we should pause the stream until the USB device is plugged in again. - * Return values 0 happen even if usb not unplugged, so needs further investigation. - */ - xprintf(this->xine, XINE_VERBOSITY_LOG, _("write to sound card failed. Was a USB device unplugged ?\n")); - - _x_assert(result >= 0); + + if( result < 0 ) { + /* FIXME: USB device unplugged. + * We should get the card into a closed state here, that involves closing + * the PCM as well as the MIXER. + * Maybe we should pause the stream until the USB device is plugged in again. + * Return values 0 happen even if usb not unplugged, so needs further investigation. + */ + xprintf(this->xine, XINE_VERBOSITY_LOG, _("write to sound card failed. Was a USB device unplugged ?\n")); + } lprintf ("loop: next buf from fifo\n"); fifo_append (this->free_fifo, in_buf); |