From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: EWX and SPDIF, can you take a look at this? Date: Wed, 02 Jul 2003 12:50:46 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <5.1.0.14.1.20030630183626.01e77e60@pop3.infotecna.lcl> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <5.1.0.14.1.20030630183626.01e77e60@pop3.infotecna.lcl> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Denis Sbragion Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 30 Jun 2003 18:49:31 +0200, Denis Sbragion wrote: > > Hello, > > may be unrelated or not. I noticed that in aplay.c (0.9.4), at line 818, > the sample rate setting is obtained with: > > rate = hwparams.rate; > err = snd_pcm_hw_params_set_rate_near(handle, params, &hwparams.rate, 0); > > Is it correct to use a reference (&) to set the sample rate? yes. the API was changed quite ago. the old API returns the sample rate, while the new API replaces the resultant rate on the given pointer. ATM, as default still the old API is chosen unless you define ALSA_PCM_NEW_HW_PARAMS_API. you shouldn't assume this in future, though. it's recommended to write with the new API. in the reference manual, only the new API is described, btw. Takashi ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01