07-20-2007 01:20 PM
07-21-2007 11:46 AM
07-22-2007 12:50 AM
Hi mike,
thanks for the advise, finally found it!!
07-24-2007 04:07 PM
Hello,
Can you add a constant of 1000 to it will wait 1 second inside the output loop?
Juan Galindo
07-24-2007 04:24 PM
07-25-2007 12:04 AM
07-25-2007 12:08 AM
Hi mike,
I had my analog input sample at 48khz, so for a delay of 1sec i should delay the sample by 48k times. i'm i on the right track?
07-25-2007 06:28 AM
07-25-2007 07:03 AM
07-25-2007 08:41 AM
Actually, you could try building a delay function yourself, the concepts aren't very hard. You need to create a stack (a FIFO buffer really) that has the same number of elements in it as you want to delay. In your case, you want to delay the output by 1 second and you are sampling at 48000 samples per second, so you would create a buffer of 48000 elements.
You then start inserting data into this buffer as it is acquired. When the buffer gets full (contains 1 second of data or 48000 samples) start shifting data out of the buffer as necessary (oldest data first) to make room for the new data you have just acquired. This data that gets shifted out is your output.
The only tricky part is managing the array manipulations such that you aren't constyantly allocating and reallocating large chunks of memory.
Mike...