Re: How to play a pcm file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clemens,
   
  thanks for your help. Can you explain what function of alsa api I insert 128kbps value of pcm file? In my example, I'm reading the content of pcm file and writing directly on sound device, however I don't know the length of buffer that I send to sound device. Can be any length of buffer?
   
  Thanks,
   
  Flavio
   
  
Clemens Ladisch <cladisch@xxxxxxxxxxxx> escreveu:
  Flávio Yuiti wrote:
> I did a test with pcm file and the sound is playing very fast,
> 
> snd_pcm_open(&handleSound,"hw:0,0",SND_PCM_STREAM_PLAYBACK,0)

Use "default" as device name. Using "hw" will prevent any automatic
sample format/rate conversions.

> //snd_pcm_hw_params_set_rate(handleSound,hardwareParam,8000,0);

This shouldn't be commented out, and you should check the return
values of all these functions.


HTH
Clemens


 __________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux