What you need is a Noise Gate.
You may find a filter that can be used with DirectX, but it will not stop
recording, just silence the data. So, it is better to do it yourself:
You should inspect the recorded audio data, and compare to a treshold.
If it is more than your "silence" level. You keep recording, if it is less
then you stop recording.
You may auto-adjust the silence level to acomodate different recording
ambients.
Remember you have positive and negative values in the data, for this
purposes you just take the absolute of the samples, average some samples and
compare.
Also try to start and stop when the signal level is at zero, to prevent
clicks. Or better yet, apply a short fade in and fade out.
best regards,
Alejandro Lapeyre
"Sakharam Phapale" <sp******@annetsite.com> escribió en el mensaje
news:Ol*************@TK2MSFTNGP10.phx.gbl...
Hi All,
I am developing an application like sound recorder.
While recording if there is a silence for more than given time (say 5
seconds),
Recording should be paused.
Is there any API function that can detect the silence or recording?
Thanks in advance,
Sakharam Phapale