[Mplayer-cvslog] CVS: main/libao2 ao_alsa9.c,1.43,1.44

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Fri Apr 2 00:24:34 CEST 2004


On Thursday, 01 April 2004 at 22:59, Adam Tla/lka CVS wrote:
> CVS change done by Adam Tla/lka CVS
> 
> Update of /cvsroot/mplayer/main/libao2
> In directory mail:/var2/tmp/cvs-serv17449/libao2
> 
> Modified Files:
> 	ao_alsa9.c 
> Log Message:
> ALSA syc is not so good as OSS - small corrections
> added Motif hints memorizing before switching to full screen because
> WM can modify decorations of the app window
> 
> 
> Index: ao_alsa9.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libao2/ao_alsa9.c,v
> retrieving revision 1.43
> retrieving revision 1.44
> diff -u -r1.43 -r1.44
> --- ao_alsa9.c	31 Mar 2004 07:40:36 -0000	1.43
> +++ ao_alsa9.c	1 Apr 2004 20:59:07 -0000	1.44
> @@ -20,13 +20,8 @@
>  #include "../config.h"
>  #include "../mixer.h"
>  
> -#if HAVE_SYS_ASOUNDLIB_H
> -#include <sys/asoundlib.h>
> -#elif HAVE_ALSA_ASOUNDLIB_H
> +#define ALSA_PCM_OLD_HW_PARAMS_API
>  #include <alsa/asoundlib.h>
> -#else
> -#error "asoundlib.h is not in sys/ or alsa/ - please bugreport"
> -#endif

Are you 100% sure the above works with ALSA 0.9.x?

>  #include "audio_out.h"
>  #include "audio_out_internal.h"
> @@ -44,7 +39,6 @@
>  
>  LIBAO_EXTERN(alsa9)
>  
> -
>  static snd_pcm_t *alsa_handler;
>  static snd_pcm_format_t alsa_format;
>  static snd_pcm_hw_params_t *alsa_hwparams;

You shouldn't commit cosmetics and code changes at the same time.

> @@ -75,8 +69,8 @@
>  
>  #define ALSA_DEVICE_SIZE 48
>  
> -#undef BUFFERTIME
> -#define SET_CHUNKSIZE
> +//#undef BUFFERTIME
> +//#undef SET_CHUNKSIZE
>  #undef USE_POLL
>  
>  
> @@ -625,7 +619,7 @@
>  		   snd_strerror(err));
>  	    return(0);
>  	  }
> -	if (verbose>0)
> +/	if (verbose>0)
>  	  printf("alsa-init: buffer_time: %d, period_time :%d\n",alsa_buffer_time, err);
>        }
>  #endif

I don't think this will even compile. Why do you commit without checking?

> @@ -635,12 +629,13 @@
>  	//set chunksize
>  	if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler, alsa_hwparams, chunk_size, 0)) < 0)
>  	  {
> -	    printf("alsa-init: unable to set periodsize: %s\n", snd_strerror(err));
> +	    printf("alsa-init: unable to set periodsize(%d): %s\n",
> +			    chunk_size, snd_strerror(err));
>  	    return(0);
>  	  }
> -	else if (verbose>0) {
> +	else // if (verbose>0) {
>  	  printf("alsa-init: chunksize set to %i\n", chunk_size);
> -	}
> +//	}
>  
>  	//set period_count
>  	if ((period_val = snd_pcm_hw_params_get_periods_max(alsa_hwparams, 0)) < alsa_fragcount) {

Again, cosmetics.

-- 
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/mplayer.html
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"




More information about the MPlayer-cvslog mailing list