Re: [Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-02-09 Thread Torsten Mohr
Hi, > You've made this stupid bug: > > data = (unsigned char *)calloc(SAMPLES*4, 0); > > should be: > > data = (unsigned char *)calloc(periodsize*4, 1); thank you so very much for that hint, that was the problem. Best regards, Torsten. ---

Re: [Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-02-09 Thread Jaroslav Kysela
On Mon, 9 Feb 2004, Torsten Mohr wrote: > Hi, > > > > thanks for that hint. > > > > > > But sadly, the attached program doesn't work, though > > > i set stop_threshold to 0. I didn't find any functions > > > > This is wrong. You need to set this value to sw_params->boundary or > > greater value

Re: [Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-02-08 Thread Torsten Mohr
Hi, > > thanks for that hint. > > > > But sadly, the attached program doesn't work, though > > i set stop_threshold to 0. I didn't find any functions > > This is wrong. You need to set this value to sw_params->boundary or > greater value to eliminate the stop detection, otherwise with zero, > the

Re: [Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-01-31 Thread Jaroslav Kysela
On Wed, 28 Jan 2004, Torsten Mohr wrote: > Hi, > > thanks for that hint. > > But sadly, the attached program doesn't work, though > i set stop_threshold to 0. I didn't find any functions This is wrong. You need to set this value to sw_params->boundary or greater value to eliminate the stop de

Re: [Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-01-30 Thread Torsten Mohr
Hi, thanks for that hint. But sadly, the attached program doesn't work, though i set stop_threshold to 0. I didn't find any functions to set buffersize to 0, it doesn't seem to be in the software parameters. It would be great, if anybody had a hint. Regards, Torsten. > Torsten Mohr wrote:

Re: [Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-01-28 Thread Clemens Ladisch
Torsten Mohr wrote: > I want to write a program where some chunk of > data is sampled from time to time, with some delay > inbetween. Your program wants to ignore any buffer overruns. To do this, you have to change the sw_params: set the stop_threshold to either 0 or the buffer size in frames (I

[Alsa-devel] Docu:: Alsa Audio API:: A minimal capture program

2004-01-27 Thread Torsten Mohr
Hi, i copied the "minimal capture program" from the Alsa page -> Documentation -> Tutorial on using the ALSA Audio API -> A minimal capture program. I added "int rate = 44100" and changed the wrong parameter "44100" in "snd_pcm_hw_params_set_rate_near" to "&rate". bash# gcc capture.c -lasound ba