summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/audio_out/audio_alsa_out.c4
-rw-r--r--src/xine-engine/audio_out.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index a1cb1241d..77928de27 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -26,7 +26,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.98 2003/07/19 11:58:32 mroi Exp $
+ * $Id: audio_alsa_out.c,v 1.99 2003/07/20 10:34:29 jcdutton Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -667,6 +667,7 @@ static int ao_alsa_write(ao_driver_t *this_gen, int16_t *data, uint32_t count) {
#ifdef LOG_DEBUG
printf("audio_alsa_out:write:loop:wait_result=%d\n",wait_result);
#endif
+ if (wait_result < 0) return 0;
}
if (this->mmap != 0) {
result = snd_pcm_mmap_writei(this->audio_fd, buffer, number_of_frames);
@@ -701,6 +702,7 @@ static int ao_alsa_write(ao_driver_t *this_gen, int16_t *data, uint32_t count) {
#ifdef LOG_DEBUG
printf("audio_alsa_out:write:loop:wait_result=%d\n",wait_result);
#endif
+ if (wait_result < 0) return 0;
}
#ifdef LOG_DEBUG
gettimeofday(&now, 0);
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 442e37ab0..2d4f5c05d 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.133 2003/07/02 23:10:21 jcdutton Exp $
+ * $Id: audio_out.c,v 1.134 2003/07/20 10:34:30 jcdutton Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -1197,6 +1197,7 @@ static int ao_change_settings(aos_t *this, uint32_t bits, uint32_t rate, int mod
output_sample_rate = this->input.rate;
if ( output_sample_rate == 0) {
+ this->driver_open = 0;
xprintf (this->xine, XINE_VERBOSITY_LOG, "open failed!\n");
return 0;
};