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-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-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. >

[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

[Alsa-devel] ALSA Howto capture code

2004-01-24 Thread Torsten Mohr
Hi everybody, i compiled the example code to capture data in "A Tutorial on Using the ALSA Audio API". It works fine as it is. I then put everything except "readi()" into an init() function and just "readi()" into a capture() function. When i now call init() once and capture() several times, ev

[Alsa-devel] Code to capture a buffer

2004-01-23 Thread Torsten Mohr
Hi, i got this code constructed from an example i found googling. What i basically want is to initialise some settings and then i'd like to capture some PCM to a buffer. This should be repeatable, i want to initialise ONCE and call a capture function whenever i need some data. It is perfectly ok

Re: [Alsa-devel] playing samples in parallel

2002-02-26 Thread Torsten Mohr
Hi, thank you for your answer, it cleared things quite up for me, i think i know now what to do. Best regards, Torsten. ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel

Re: [Alsa-devel] playing samples in parallel

2002-02-25 Thread Torsten Mohr
Hi everybody, i don't know, is my question off-topic? Where can i get some help? Would it help to mail the sources? Is it an obvious mistake i make? I really tried to describe the problem in detail, are there any important points missing? Best regards, Torsten. _

[Alsa-devel] playing samples in parallel

2002-02-24 Thread Torsten Mohr
Hi everybody, i'm new to this list, so i hope this question is not off-topic. I'm trying to play several samples in parallel or at certain undetermined points, e.g. when an event happens. To test this i load two different WAV files, that i can play independently, start the first one, do a "slee