I'd really love to see an explicit example of an exclusive-mode audio application which takes its input from line in (not microphone) at a certain input level (volume), and does the absolute minimum to achieve this. (C++ preferred, but anything is better than nothing)
This sounds like it should be simple, but finding out how has been frustratingly hard.
For example, the Device Topologies documentation from Microsoft makes it sound like if you have simple common audio hardware (like on most desktop PCs) and you only want to set volume, mute, or select channel, then you won't need to worry about device topologies because the Device Topologies API is for much more complex devices.
That would be terrific, but it stops short of saying how, and raises other questions: is there a standard for the common desktop PC audio that always seems to provide speaker out, line in, and microphone in? Will line in and microphone always be mixed or multiplexed as a result of such a standard? The diagram in this Device Topologies documentation indicates multiplexing; I have old mixerXXX()
code I am trying to upgrade that indicates mixing.
Also, further reading about Endpoint Volume Controls suggests that this may be doable using the IAudioEndpointVolume
interface, but the audio examples in the Win 7.1 SDK did not give examples of IAudioEndpointVolume
with input devices. The documentation on individual IAudioEndpointVolume
functions indicates support for both input and output ("audio stream that enters or leaves the audio endpoint device") but none of those functions seem to support multiplexing, and again indicate mixing of line in and microphone signals.