Hi everyone,
I would like to implement a Virtual Audio Device which processes stereo, 5.1 or
7.1 streams, performs some spatialisation audio processing, and outputs stereo.
A requirement is that applications such as audio players (VLC, DAWs, etc)
should see and use my device to get the processing done and the user can then
hear the processed stereo output from one of the available stereo loudspeakers.
I’ve had a go with SYSVAD for the kernel part, so that audio applications and
players can select my VAD.
To my knowledge, one way to perform my processing could be to create a
dedicated AUDIO_MODULE on the kernel side.
What is not totally clear to me is how to get the output stream from SYSVAD
and re-route it to available stereo speakers.
I understand I will have to write a user application for that, but I would
really appreciate if someone could point me to what specific
API/architecture/technology/code should I use for that.
I have found
https://docs.microsoft.com/de-de/windows/win32/coreaudio/stream-management ;
<https://docs.microsoft.com/de-de/windows/win32/coreaudio/stream-management>,
but am I right in thinking that using those APIs I should get the stream from
the loopback pin and reroute it to some speaker device?
One thing I cannot but notice is how Wave NX (https://www.waves.com/nx ;
<https://www.waves.com/nx>) has implemented a very similar product to what I am
about to develop (the only difference is that it is supposed to be used with
headphones and not with loudspeakers).
On KS Studio I notice their filter (Waves Virtual Speaker) architecture is as
follows:
Data input pin -> DAC node -> VOLUME node -> output pin
And they have an app called "WavesLoop Application" which is constantly running
and apparently provides a list of stereo output devices and performs the
operations on the streams in user mode.
What I do not understand is how they manage to get the kernel buffer stream
from the LINEOUT endpoint without apparently having any loopback.
I have been looking around on the MS documentation and here on this mail list
for weeks now and I got very confused, so if literally ANYONE can point me to
the right direction, that would be really appreciated.
Thanks in advance,
Giacomo
(P.S: I have seen a similar unanswered request from long time ago:
https://www.freelists.org/post/wdmaudiodev/MSVAD-Another-Routing-Audio-Driver ;
<https://www.freelists.org/post/wdmaudiodev/MSVAD-Another-Routing-Audio-Driver>)