changeset 12003:48f1b211f43b

replace set_periods and set_period_size with their _near cousins
author henry
date Fri, 27 Feb 2004 17:03:08 +0000
parents b9046e5093cc
children 494a93a19242
files libao2/ao_alsa9.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_alsa9.c	Fri Feb 27 16:57:06 2004 +0000
+++ b/libao2/ao_alsa9.c	Fri Feb 27 17:03:08 2004 +0000
@@ -633,7 +633,7 @@
 #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 @@
 	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));
 	}
       }