[alsa-devel] question application playback

Wang Xingchao wangxingchao2011 at gmail.com
Sun Jan 29 07:31:25 CET 2012


在 2012年1月4日 上午8:33,Vinod Koul <vinod.koul at linux.intel.com>写道:
>
> On Wed, 2012-01-04 at 11:22 +0530, Rajeev kumar wrote:
> > > On 01/03/2012 05:53 PM, Ricardo Barbosa wrote:
> > >> Hi all.
> > >>
> > >>
> > >> I am new to development using the alsa API and follow the link code
> > http://equalarea.com/paul/alsa-audio.html
> > >>
> > >> insert the following code.
> > >>
> > >>    FILE *fp;
> > >>    fp = fopen("file.mp3", "r");
> > >>    fclose(fp);
> > >>
> > >> and changed variable buf by the variable fp, but by running the
> > file file.mp3 he does not play according to the way it interferes with
> > the function snd_pcm_writei ? someone could help me in developing this
> > playback, I thank
> > >>
> >
> > AFAIK, ALSA can play mp3 files.
> really??? not the pcm interface.....

i used tool "aplay" to "play" mp3 files sucessfully. :)
well, in this scenario, alsa is used as data transfer interface, there
must be mp3 decode interface in kernel layer to receive mp3 data and
do the post work.  mp3 data is regarded as pcm data during transfer,
so the format and rate must be specified with aplay.

thanks
--xingchao

>
> --
> ~Vinod
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


More information about the Alsa-devel mailing list