[linux-audio-dev] Set rate return zero
Florian Paul Schmidt
mista.tapas at gmx.net
Sun Jul 9 15:20:57 UTC 2006
On Sun, 09 Jul 2006 14:03:50 +0200
Jens M Andreasen <jens.andreasen at chello.se> 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;
> > 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.
More information about the Linux-audio-dev