changeset 17574:9c90977d9f50

Remove a call to snd_pcm_prepare() because snd_pcm_hw_params() does it automatically, and remove a call to snd_pcm_drop() because snd_pcm_close() does it automatically.
author cladisch
date Fri, 10 Feb 2006 09:26:11 +0000
parents 8921544f4114
children 9972b744fd98
files libao2/ao_alsa.c
diffstat 1 files changed, 0 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_alsa.c	Fri Feb 10 09:24:48 2006 +0000
+++ b/libao2/ao_alsa.c	Fri Feb 10 09:26:11 2006 +0000
@@ -662,11 +662,6 @@
 	    mp_msg(MSGT_AO,MSGL_V,"alsa-init: bits per sample (bps)=%i, bits per frame (bpf)=%i, chunk_bytes=%i\n",bits_per_sample,bits_per_frame,chunk_bytes);}
 	//end swparams
 
-      if ((err = snd_pcm_prepare(alsa_handler)) < 0)
-	{
-	  mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: pcm prepare error: %s\n", snd_strerror(err));
-	}
-
       mp_msg(MSGT_AO,MSGL_INFO,"alsa: %d Hz/%d channels/%d bpf/%d bytes buffer/%s\n",
 	     ao_data.samplerate, ao_data.channels, bytes_per_sample, ao_data.buffersize,
 	     snd_pcm_format_description(alsa_format));
@@ -687,14 +682,6 @@
     if (!immed)
       snd_pcm_drain(alsa_handler);
 
-    if (!ao_noblock) {
-      if ((err = snd_pcm_drop(alsa_handler)) < 0)
-	{
-	  mp_msg(MSGT_AO,MSGL_ERR,"alsa-uninit: pcm drop error: %s\n", snd_strerror(err));
-	  return;
-	}
-    }
-
     if ((err = snd_pcm_close(alsa_handler)) < 0)
       {
 	mp_msg(MSGT_AO,MSGL_ERR,"alsa-uninit: pcm close error: %s\n", snd_strerror(err));