Update of /cvsroot/alsa/alsa-tools/ac3dec In directory usw-pr-cvs1:/tmp/cvs-serv24068/ac3dec
Modified Files: config.h.in output.c Log Message: Updated to latest alsa-lib PCM API Index: config.h.in =================================================================== RCS file: /cvsroot/alsa/alsa-tools/ac3dec/config.h.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- config.h.in 5 Aug 2001 11:50:02 -0000 1.2 +++ config.h.in 19 Sep 2002 16:20:08 -0000 1.3 @@ -13,12 +13,18 @@ /* Version number of package */ #undef VERSION - -/* Architecture defines */ +/* Using i386 architecture */ #undef __i386__ + +/* Using Alpha architecture */ #undef __alpha__ + +/* Using SPARC architecture */ +#undef __sparc__ + +/* Using PowerPC architecture */ #undef __ppc__ -#undef __sparc__ -/* Big-Endian */ -#undef WORDS_BIGENDIAN +/* Using IA-64 architecture */ +#undef __ia64__ + Index: output.c =================================================================== RCS file: /cvsroot/alsa/alsa-tools/ac3dec/output.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- output.c 8 Jan 2002 17:21:28 -0000 1.15 +++ output.c 19 Sep 2002 16:20:10 -0000 1.16 @@ -20,6 +20,7 @@ #include <stdio.h> #include <errno.h> +#define ALSA_PCM_NEW_HW_PARAMS_API #include <alsa/asoundlib.h> typedef signed short sint_16; @@ -38,8 +39,7 @@ const char *pcm_name = output->pcm_name; char devstr[128]; snd_pcm_hw_params_t *params; - snd_pcm_sframes_t buffer_time; - snd_pcm_sframes_t period_time, tmp; + unsigned int rate, buffer_time, period_time, tmp; int err, step; snd_pcm_hw_params_alloca(¶ms); @@ -126,14 +126,15 @@ fprintf(stderr, "Channels count non available"); goto __close; } - err = snd_pcm_hw_params_set_rate_near(pcm, params, output->rate, 0); + rate = output->rate; + err = snd_pcm_hw_params_set_rate_near(pcm, params, &rate, 0); if (err < 0) { fprintf(stderr, "Rate not available"); goto __close; } - buffer_time = snd_pcm_hw_params_set_buffer_time_near(pcm, params, - 500000, 0); - if (buffer_time < 0) { + buffer_time = 500000; + err = snd_pcm_hw_params_set_buffer_time_near(pcm, params, &buffer_time, 0); + if (err < 0) { fprintf(stderr, "Buffer time not available"); goto __close; } @@ -141,18 +142,18 @@ period_time = 10000 * 2; do { period_time /= 2; - tmp = snd_pcm_hw_params_set_period_time_near(pcm, params, - period_time, 0); + tmp = period_time; + err = snd_pcm_hw_params_set_period_time_near(pcm, params, &tmp, 0); + if (err < 0) { + fprintf(stderr, "Period time not available"); + goto __close; + } if (tmp == period_time) { period_time /= 3; - tmp = snd_pcm_hw_params_set_period_time_near(pcm, params, - period_time, 0); + tmp = period_time; + err = snd_pcm_hw_params_set_period_time_near(pcm, params, +&tmp, 0); if (tmp == period_time) period_time = 10000 * 2; - } - if (period_time < 0) { - fprintf(stderr, "Period time not available"); - goto __close; } } while (buffer_time == period_time && period_time > 10000); if (buffer_time == period_time) { ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog