From: Maxim L. <max...@gm...> - 2007-08-12 13:17:35
|
Hi, I noticed that playing files with xine sometimes produces clicks. I tracked down that issue to xine re-sampler Alsa have also not so bad re-sampler, and it works great for me. This path below (against xine 1.1.7) adds configuration option (disabled by default) to use alsa re-sampler. Best regards, Maxim Levitsky -------------------------------------------------------------------------------------------------------------------------------------------- --- ./xine-lib-1.1.7/src/audio_out/audio_alsa_out.c 2007-06-05 00:37:38.000000000 +0300 +++ ./xine-lib-1.1.7-modifed/src/audio_out/audio_alsa_out.c 2007-08-12 15:28:48.000000000 +0300 @@ -310,2 +310,4 @@ static int ao_alsa_open(ao_driver_t *thi + int resample; + snd_pcm_hw_params_alloca(¶ms); @@ -462,4 +464,4 @@ static int ao_alsa_open(ao_driver_t *thi #if SND_LIB_VERSION >= 0x010009 - /* Restrict a configuration space to contain only real hardware rates */ - err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 0); + resample = config->lookup_entry(config, "audio.device.resample_alsa")->num_value; + err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, resample); #endif @@ -1371,2 +1373,11 @@ static ao_driver_t *open_plugin (audio_d NULL); + + config->register_bool (config, + "audio.device.resample_alsa", + 0, + _("allow to use alsa internal resampler"), + _("Try to enable this if you hear clicks in sound playback"), + 10, NULL,NULL); + + pcm_device = config->register_string(config, |