From 1dcd406060a4f43af337327cceae332b43de1015 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Sat, 15 Mar 2003 13:50:58 +0000 Subject: should do snd_pcm_prepare after snd_pcm_drop as otherwise we are left in SND_PCM_STATE_SETUP - fixes bad state errors when seeking CVS patchset: 4423 CVS date: 2003/03/15 13:50:58 --- src/audio_out/audio_alsa_out.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 2ef0ab07e..e8f0eb25d 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 * * - * $Id: audio_alsa_out.c,v 1.87 2003/03/04 10:30:27 mroi Exp $ + * $Id: audio_alsa_out.c,v 1.88 2003/03/15 13:50:58 jstembridge Exp $ */ #ifdef HAVE_CONFIG_H @@ -793,7 +793,10 @@ static int ao_alsa_ctrl(ao_driver_t *this_gen, int cmd, ...) { if ((result=snd_pcm_drop(this->audio_fd)) < 0) { printf("audio_alsa_out: Drop call failed err=%d\n",result); } - } + if ((result=snd_pcm_prepare(this->audio_fd)) < 0) { + printf("audio_alsa_out: Prepare call failed err=%d\n",result); + } + } break; } -- cgit v1.2.3