Re: [linux-audio-dev] Set rate return zero

From: Florian Paul Schmidt <mista.tapas@email-addr-hidden>
Date: Sun Jul 09 2006 - 18:20:57 EEST

On Sun, 09 Jul 2006 14:03:50 +0200
Jens M Andreasen <jens.andreasen@email-addr-hidden> wrote:

> On Sun, 2006-07-09 at 12:06 +0700, Huu Phuoc wrote:
> > Hi everybody!
> > I am a newbie to alsa programming.
> > I am trying to follow the article which locates at
> > http://www.suse.de/~mana/alsa090_howto.html to develop a playback program.
> > My code here:
>
> > snd_pcm_t*pcm_handle;
> > unsigned int rate = 8000;
> ^^^^^^
> [snip]
>
> > snd_pcm_prepare(pcm_handle);
> > Unfortunately, exact_rate is zero.The following lines were printed out:
>
> > The rate 8000 Hz is not supported by your hardware.
> > => Using 0 Hz instead.
>
> > If exact_rate > 0 is OK but it is zero.
> > I don't know how to solve the problem.
> > Please help me.
>
> Try to replace "rate = 8000" with something that *is* supported by your
> hardware. 48000 could be a good choice.

He uses "plughw:0" as pcm dcevice, no? THis should take care of
converting the samplerte regardless of what his hw supports.

Flo

-- 
Palimm Palimm!
http://tapas.affenbande.org
Received on Sun Jul 9 20:15:03 2006

This archive was generated by hypermail 2.1.8 : Sun Jul 09 2006 - 20:15:03 EEST