From 8c55d85a17d42803c5c1a2bebea38bb879bfcad7 Mon Sep 17 00:00:00 2001 From: henry Date: Fri, 27 Feb 2004 17:03:08 +0000 Subject: [PATCH] replace set_periods and set_period_size with their _near cousins git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12004 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_alsa9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libao2/ao_alsa9.c b/libao2/ao_alsa9.c index 4648ef956a..0fed30cbc6 100644 --- a/libao2/ao_alsa9.c +++ b/libao2/ao_alsa9.c @@ -633,7 +633,7 @@ static int init(int rate_hz, int channels, int format, int flags) #ifdef SET_CHUNKSIZE { //set chunksize - if ((err = snd_pcm_hw_params_set_period_size(alsa_handler, alsa_hwparams, chunk_size, 0)) < 0) + 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)); return(0); @@ -650,7 +650,7 @@ static int init(int rate_hz, int channels, int format, int flags) if (verbose>0) printf("alsa-init: current val=%i, fragcount=%i\n", period_val, alsa_fragcount); - if ((err = snd_pcm_hw_params_set_periods(alsa_handler, alsa_hwparams, alsa_fragcount, 0)) < 0) { + if ((err = snd_pcm_hw_params_set_periods_near(alsa_handler, alsa_hwparams, alsa_fragcount, 0)) < 0) { printf("alsa-init: unable to set periods: %s\n", snd_strerror(err)); } }