diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2002-06-13 18:39:17 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2002-06-13 18:39:17 +0000 |
commit | 1bdfaf59105775beb47f3861cd84c0ac83d30ba8 (patch) | |
tree | 951d646b01faa6647844d34bb4e0ef2f1438202d | |
parent | 0e3d83c1b94478d6a104aa6c6ab4975ec7a44d6b (diff) | |
download | xine-lib-1bdfaf59105775beb47f3861cd84c0ac83d30ba8.tar.gz xine-lib-1bdfaf59105775beb47f3861cd84c0ac83d30ba8.tar.bz2 |
Try to use snd_pcm_pause, fallback to a reset if it doesn't work.
CVS patchset: 2072
CVS date: 2002/06/13 18:39:17
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 42b85cb29..e71c3c010 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.56 2002/06/12 12:22:26 f1rmb Exp $ + * $Id: audio_alsa_out.c,v 1.57 2002/06/13 18:39:17 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -647,28 +647,20 @@ static int ao_alsa_ctrl(ao_driver_t *this_gen, int cmd, ...) { case AO_CTRL_PLAY_PAUSE: if ((this->has_pause_resume) && (this->audio_fd > 0)) { -#if 0 if ((result=snd_pcm_pause(this->audio_fd, 1)) < 0) { - printf("Pause call failed err=%d\n",result); + printf("audio_alsa_out: Pause call failed, try drop/prepare instead\n"); + ao_alsa_ctrl(this_gen, AO_CTRL_FLUSH_BUFFERS); } -#else - if ((result=snd_pcm_drop(this->audio_fd)) < 0) { - printf("Drop call failed err=%d\n",result); - } - if ((result=snd_pcm_prepare(this->audio_fd)) < 0) { - printf("Prepare call failed err=%d\n",result); - } -#endif + } else { + ao_alsa_ctrl(this_gen, AO_CTRL_FLUSH_BUFFERS); } break; case AO_CTRL_PLAY_RESUME: if ((this->has_pause_resume) && (this->audio_fd > 0) ) { -#if 0 if ((result=snd_pcm_pause(this->audio_fd, 0)) < 0) { printf("Resume call failed err=%d\n",result); } -#endif } break; |