[MPlayer-cvslog] CVS: main/libao2 ao_alsa.c,1.28,1.29

Clemens Ladisch CVS syncmail at mplayerhq.hu
Fri Feb 10 10:26:13 CET 2006


CVS change done by Clemens Ladisch CVS

Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv9103/libao2

Modified Files:
	ao_alsa.c 
Log Message:
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.

Index: ao_alsa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_alsa.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ao_alsa.c	10 Feb 2006 09:24:48 -0000	1.28
+++ ao_alsa.c	10 Feb 2006 09:26:11 -0000	1.29
@@ -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));




More information about the MPlayer-cvslog mailing list