[Alsa-user] ALSA sound data question

2011-10-20 Thread Xiaofeng Li
Hi There, Is ALSA sound data always from 0 to 255 ? not having negative value if I used Signed 16 bit little endian PCM format? Previously my buffer was unsigned char, and then I changed to short int. It does not make any difference. The following is my setting, I used Signed 16 bit little endia

[Alsa-user] Message "ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default1 prog_name: pcm_params.c:2286: snd_pcm_hw_refine: Assertion `pcm && params' failed."

2011-10-06 Thread Xiaofeng Li
I programmed with a IPC protocol API with ALSA, and when I entered devices name are malformed and my program crashed and returned the following message in stderr. I think besides a non-nagative number returned by snd_pcm_open, this breaks the protocol I am using. Can't do too much on the other APIs

[Alsa-user] ALSA playback question

2011-09-07 Thread Xiaofeng Li
(int)frames) { fprintf(stderr, "short write, write %d frames\n", rc); } } snd_pcm_drain(handle); snd_pcm_close(handle); free(buffer); return 0; } Thanks~ Xiaofeng Li -- Using storage to extend t

[Alsa-user] ALSA Playback question-asked by a newbie

2011-09-06 Thread Xiaofeng Li
Hi There, I compiled and run a simply playback example that is found in the following url, and it records/plays back ok in my linux, http://www.linuxjournal.com/article/6735?page=0,1 This examples demos shows writing 5 secs of binary data to PCM device to playback. If I have a raw audio file tha