Raymond Yau wrote: > 2010/4/21 Stefan Schoenleitner <dev.c0debabe@xxxxxxxxx> >> If it helps, I pasted the source code here so that you can view it nicely: >> http://pastebin.com/fCicqctq >> > which sound card are you using ? > > The program did not run on my two sound card since you are using 160 frames > and mono > > are you using "pulse" device for testing since only pulse device return the > error messages "could not read from capture device: Resource temporarily > unavailable" ? Yes, I am using pulseaudio since my hardware sound card (an audigy 2) does not support the period size I'm using. The error message above is is from my own program (line 444): ----------------------------------------------------------------- if ((ret=snd_pcm_readi(capture_device, buffer, 160))<0) { if (ret == -EPIPE) { fprintf(stderr, "XRUN while reading from capture device: %s\n", snd_strerror(ret)); snd_pcm_prepare(capture_device); snd_pcm_start(capture_device); } else { fprintf(stderr, "could not read from capture device: %s\n", snd_strerror(ret)); exit(EXIT_FAILURE); } } ----------------------------------------------------------------- cheers, stefan _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel