According to the alsa documentation, the return value of snd_hw_params_set_rate_near is the 'approximate chosen rate', and the 3rd arg being type 'int'. The two tutorials at the documentation section of the alsa-project website both hold true to this with code like:exact_rate = snd_p...
alsa_driver.c: In function `alsa_driver_configure_stream': alsa_driver.c:394: warning: passing arg 3 of `snd_pcm_hw_params_set_rate_near' makes integer from pointer without a cast I am copying this response to alsa-devel. If I'm wrong, someone there will probably set me straight. :...
> 3rd arg being type 'int'. The two tutorials at the documentation > section of the alsa-project website both hold true to this with code > like: > > exact_rate = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, rate, &dir); > if (dir != 0) { > fprintf(stderr, "Th...
> > This is caused by snd_pcm_hw_params_set_rate_near parameter val needing > > to be a pointer, and alsa_driver passing in the frame rate instead. > > > > This occurs against current CVS of alsa. (2004-03-02) > > I think this is the wrong fix, Sam. > > Apparently, that...
exact_rate = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, rate, &dir); if (dir != 0) { fprintf(stderr, "The rate %d Hz is not supported by your hardware.\n ==> Using %d Hz instead.\n", rate, exact_rate);