From: Patrick on
You are using the DAQ toolbox? The fastest way to accomplish this might be a getsample() followed by a putsample()

"lior " <liord2(a)gmail.com> wrote in message <huu8jk$458$1(a)fred.mathworks.com>...
> hello,
> i'm trying to get a code which will continuously sample an analog input (microphone) and then output the sample to a speaker.
> i'm trying to do it using 2 TimerFcn, one for the input and one for the output, but only one of them is working (the last).
> i also tried doing it with one timer function but i keep getting an error.
>
> anyone have an idea?
>
> thanks.