[MPlayer-dev-eng] merging alsa9/alsa1.x

James Courtier-Dutton James at superbug.demon.co.uk
Mon Apr 19 15:25:10 CEST 2004


Is there a reason why you did all that #ifdef stuff, instead of just 
adding 2 #define lines like I showed?
With the 2 #define lines, you just use the lines under "#ifdef 
HAVE_ALSA1X" for both 0.9 and 1.x


joy at pingfm.org wrote:
>>
>>Which 5 lines do you use ?
> 
> #ifdef HAVE_ALSA1X
>       if ((err = snd_pcm_hw_params_set_rate_near(alsa_handler, 
> alsa_hwparams, 
> 						 &ao_data.samplerate, 
> &dir)) < 0) 
> #else
>       if ((err = snd_pcm_hw_params_set_rate_near(alsa_handler, 
> 						 alsa_hwparams, 
> ao_data.samplerate, 0)) < 0)
> #endif
> 
> 'dir' has to be set to 0.
> 
> 
>>My two lines are just to insert these 2 lines somewhere before
>>"#include <alsa/asoundlib.h>"
>>
>>#define ALSA_PCM_NEW_HW_PARAMS_API
>>#define ALSA_PCM_NEW_SW_PARAMS_API
>>




More information about the MPlayer-dev-eng mailing list