
If you're not working in real-time, things get much easier. For example, make sure that the sound card's input buffers never overflow, and that the output buffers never get empty. unless you write a kernel-mode driver, which I've never done, but I know it's not easy! The trick is to use buffers effectively.

Your program NEVER has uninterruptable control of the CPU. REAL-TIME ISSUES - Digital processing in real-time is "interesting" with a multitasking operating system.

Capturing the input from 2 sound cards simultaniously would most likely be much trickier than capturing 4 channels from one card (fewer multi-threading issues to deal with). If you use 2 standard sound cards, you will have to mix digitally. You "capture" the analog sound (either as 4 wave files, or as one 4-channel wave file), and digitally manipulate/mix it later.

The standard application for this type of card is as a 4-track digital recorder. From the compatability info, I'd guess their driver works seamlessly with Windows and the WinAPI. I took a quick look at your M-AUDIO link. (A sample in a 16 bit wave file will have a value between -3277.) All of the files would need to have the same sample rate, and you'd have to scale the levels, so that the summed result doesn't attempt to go over "zero dB". If you are not concerned about real-time processing, it would be easy to mix two (or more) wave files, and save the result to another file. But, I assume that Direct-X does have such a function. I'm pretty sure that there are no standard WinAPI functions for mixing sounds digitally. Now, everything above is related to mixing the analog signals in the sound card's hardware. All of the consumer cards are "soundblaster compatable". it might only work with the manufacturer's software. A special purpose multi-input sound card could be a problem, because the driver may not work with the standard Windows API.

You'll need a special (professional) sound card if you need multiple line-level inputs. Most sound cards have only one auxiliary input. I think most of the Direct-X stuff is geared toward real-time processing. Windows has a file named MMSYSTEM.DLL, that has lots of multimedia functions. You can look-up mmsystem (Multi Media System). The WinAPI (Application Programming Interface) probably has most, if not all of the functions that you need.
