View Full Version : confused with echo effect

11-24-2008, 06:56 AM
hello guys, i mostly finished my final project from microcomputer systems, however, in one part of it , im trying to code a echo , it is basically a delay function. it delays the input while also stores the input.
here is the code that i wrote,

int input=0;

if(input++>mybuffersize)// it increments the inputs location so that it uses after a little while. it makes teh code continues loop.

outd1=input-D1; here i said D1 is my delay which i wrote 3200/4800 so it can be heard it is a near second.

outd1=mybuffersize - outd1; this part is like a absolute value , when my delay is (-) it simply subtracts from the original buffer size which is 4800 and also defined in global variables.

as final , ichannel0leftout=ichannel0leftin+Buffer[outd1];

so i send everything back to left speaker.

this code, suppose to store the audio sample and it will change its location in the array and after a second i will hear it again.

11-25-2008, 05:10 AM
no one knows :S??