[alsa-devel] Help

Sudeept Prusti sudeeptp at tataelxsi.co.in
Fri Apr 24 13:53:52 CEST 2009


Hi Jaroslav,
 
can u tell what all are changes to be made for the program to playout a simple PCM file. if any reference you could give me then it's quiet good.
 
Thanks,
Sudeept

________________________________

From: Jaroslav Kysela [mailto:perex at perex.cz]
Sent: Fri 4/24/2009 5:09 PM
To: Sudeept Prusti
Cc: ALSA development
Subject: Re: [alsa-devel] Help



On Fri, 24 Apr 2009, Sudeept Prusti wrote:

> Hi all,
>
> As i am working on alsa for minimal PCM playback (8khz,mono,16 bit pcm
> file).
>
> When i tried to allocate 1k buffer and send through snd_pcm_writei()
> call it doesn't play perfect and skips are there in between. If we keep
> on increasing in allocating the buffer for 31 kb then it could play the
> buffers randomly.

Sure. Your file read logic is broken. You have to check number of bytes
read and do not assume that 'k' bytes were read all time. Also, using seek
is not necessary for sequential reads.

                                                Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.




The information contained in this electronic message and any attachments to this message are intended for the exclusive 
use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended
 recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy
 all copies of this message and any attachments contained in it.



More information about the Alsa-devel mailing list