Aha. Thanks for this - I’ll put the book I was reading on WDF firmly on the
bookshelf for now… Can anyone recommend something clear to read on
miniport drivers etc so I can get my head around MSVAD properly?
More below…
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@probo.com
Sent: 22 June 2009 06:41
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] UMDF Software Audio Driver?
On Sun, Jun 21, 2009 at 12:14:19PM +0100, Richard Furse wrote:
>
> I want to write a software audio driver to route main audio streams
> […]
That depends on how broad you want this to be. If you are
able to live with handling only your own applications, then
finding a way to intercept things within your application is
well worth the trouble. The audio subsystem in Windows is
complicated.
Sadly not - I want to be able to divert the audio coming out of other
applications, e.g. while watching a film or playing a CD in Media Player.
Are you trying to fit yourself in the middle of the existing
audio stream, so that the normal speakers still work? Or are
you actually trying to create a full fake audio device that
will be seen as an autio renderer? That changes the answer.
This is a full “fake” audio device. I’m reprocessing the audio and using it
to drive an irregular speaker rig using Ambisonics and some new stuff. I
have it working already using physical cables to get the audio into the
code, but obviously that’s somewhat less than ideal.
> I can probably base what I’m doing on the MSVAD example in
the WinDDK,
MSVAD gives you a virtual audio device, where applications
can select your device as their output device. That means
their output no longer goes to the speakers.
> but I’m trying to be a good citizen and use the new UMDF/KMDF model.
> Does anyone know if this is possible / sane to do with UMDF?
No, it can’t be done in UMDF. Audio drivers are kernel
streaming drivers or “port class” drivers. Technically you
could use the "miniport"mode of KMDF, but in my view it’s
more trouble than it’s worth for now.
Okay, thanks. I’d read several hundred pages of a WDF book and numerous web
pages without working that out :-/
Any recommendations on a relevant book would be very much appreciated!
If you are trying to filter the output on its way to the
normal speakers, then you might be able to write an APO
(audio processing object), which is a COM DLL that lives in
the special audio process. That’s way easier than writing a driver.
Sadly not…
> One way or another, I’ll also need a bridge from the driver to the
> separate user-space process. What do folk recommend for
this? If I’m
> streaming 7.1 I’ll need a reasonable bandwidth… Shared memory?
> Sockets? Are these going to be easy to use from MSVAD or UMDF etc?
I’m still not clear on where the output goes. You send it to
some kind of rendering process, and then what? To the
screen? To another system?
To a piece of hardware?
The output goes to a speaker array, just not a 5.1 array or suchlike… For
instance, I’m using a quite irregular arrangement of 15 speakers here at the
moment, roughly organised as an upper and lower circle, with a higher
density at the front. The “front left” channel from a DVD actually comes out
of a bunch of speakers to give a solid impression of a front left sound
image to the audience. The software uses DirectSound or ASIO to access the
hardware, ASIO in this case (I’m not aware of a way to drive 15 speakers
with DirectSound right now). I already have an OpenAL driver using this
stuff; this embeds all the relevant software in-process within a running
game rather than using a bridging approach, however this is pretty heavy
numerical code and probably exactly what you *shouldn’t* be running in the
kernel!
So I guess I need a fairly simple kernel driver based on MSVAD that bridges
the audio out using some internal protocol for this project, using shared
memory or sockets or …? Using floats and 7.1 running at 48kHz you’re
dealing with a latency-sensitive 1.5MB/s though, so bandwidth is relevant
and I’m not sure what would be best to use yet. Ideas appreciated ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=12)
–
Tim Roberts, xxxxx@probo.com
Providenza & Boeklheide, Inc.
Thanks!
–Richard