From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Courtier-Dutton Subject: problem with "snd_pcm_hw_params_set_period_size_near" Date: Sat, 27 Sep 2003 15:44:17 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <3F75A241.80003@superbug.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: alsa-devel List-Id: alsa-devel@alsa-project.org if the buffer size has already been set to 16384, and the period_size is trying to be set to 8196, why do I get the following results: - period_size=8196 dir=0; err = snd_pcm_hw_params_set_period_size_near(this->audio_fd, params, &period_size, &dir); result: period_size=8196 period_size=8196 dir=1; err = snd_pcm_hw_params_set_period_size_near(this->audio_fd, params, &period_size, &dir); result: period_size=16384 In the second example, all that has changed in the value of "dir". I though -1 means find a value equal to or less than. 0 means find a value closest to. 1 means find a value equal to or greater than. But the above experiment resulted in: - 1 means find a value greater than. Cheers James ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf