Why is it that snd_pcm_hw_params_set_period_time_near() under the circumstances described below doesn't yield a single period size? I do the following (driver 0.9.7a, sound card RME Digi96/8 PAD): snd_pcm_open plughw:0,0 snd_pcm_hw_params_set_access interleaved snd_pcm_hw_params_set_format S16 snd_pcm_hw_params_set_channels 2 snd_pcm_hw_params_set_rate_near 11025 snd_pcm_hw_params_set_period_time_near 5000 us snd_pcm_hw_params_set_buffer_time_near 500000 us
When querying min/max period size in this particular case I still get multiple period sizes in the configuration space (min 127, max 129). However using snd_pcm_hw_params_test_period_size() shows that in this case only a period size of 128 is available. Can someone please explain this behaviour?
BTW, In the online documentation snd_pcm_hw_params_get_period_size() I read: Returns: 0 otherwise a *negative* error code if not exactly one is present
However clicking on the /test/pcm.c link brings up this fragment: err = snd_pcm_hw_params_get_period_size(params, &period_size, &dir); if (err > 0) { printf("Unable to get period size for playback: %s\n", snd_strerror(err)); return err; }
Why the test for a *positive* error value? Have some parts of the API been changed perhaps?
Theo
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user