News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Processing sound input

Started by petezl, January 20, 2005, 01:48:06 PM

Previous topic - Next topic

petezl

You can use the sound card so that input from say a microphone can be stored in a wav file. Is there any reasonably simple way to intercept this waveform for processing? For instance, by writing a high pass filter program! etc...

Peter.
Cats and women do as they please
Dogs and men should realise it.

vitsoft

10 years ago I wrote a sound recorder in ASM for DOS. Two 64KB buffers were allocated and the sound card was sending samples through DMA channel alternatively to buffer 1 or 2.  The currently idle buffer had to be processed sooner than SoundBlaster signalized with IRQ that it is finishing the other buffer.
Intel 386 machine was quick enough to write idle buffer on disk and to sniff inside the other buffer and update the volume indicator in the time of leisure.  Real-time processing of sound shouldn't be a problem with today's processors.

petezl

Thats interesting to know that it can be done. The delay between input and output would be of no consequence under normal circumstances. If output needed to be compared with input then there would be an undesirable phase shift but if that was reasonably constant then it could be allowed for.
Will make a search to see if I can find more details...
Peter.
Cats and women do as they please
Dogs and men should realise it.