Hi everyone,
Some of you probably remember me. I was involved with trying to get
audio/sound implemented in ReactOS a few years ago.
To be honest, my progress was rather poor, I managed to write a few bits of
code but never really had a proper understanding of kernel/OS development or
CPU/system architectures. Additionally, whilst I could grasp how the
multimedia APIs (MME) in NT4 worked, and how they interacted with the
drivers (audio device X opens device Y and writes buffered data to it) for
Windows 2000 and later, Kernel Streaming was used which partly built on top
of the older implementation but added a load of new stuff.
This complicated matters as firstly, KS uses COM (which I still struggle to
wrap my head around) in kernel-mode, secondly there were multiple components
involved between the application and the hardware (wdmaud.drv -> wdmaud.sys
-> ks.sys -> portcls.sys -> driver as far as I remember), and finally I
really struggled to find example code and thorough documentation describing
how it all worked.
Ultimately I gave up with that and intended to move to another platform to
develop multimedia applications. Not much happened with that.
I remember there were complaints from application developers over Kernel
Streaming offering poor latency - instead developers would turn to other
technologies such as ASIO or DirectSound. So for recent versions of Windows
(Vista onwards?) Microsoft implemented a new, user-mode sound system
(WASAPI) which again uses COM but is pretty nicely documented, with code
samples.
Having done a little reading about this, it renewed my interest. It still
uses COM, and KS.SYS is still present (I assume for compatibility?) but as a
lot of this is implemented in user-space I suspect it'd be easier to
develop/test.
Aside from this, over the past few years I've also gained a better
understanding of topics I didn't know much about previously and I feel more
confident at being able to write lower-level stuff that works properly. I've
also developed more of a keen interest in how Windows works.
So basically I'm considering implementing the current Windows audio system
in ReactOS. I'd imagine we don't need to be too concerned about audio
drivers themselves (at least, initially) as vendors tend to offer these and
it's not like we need sound immediately post-install!
The only thing I really lack now is knowledge of how to implement COM
classes - at least, outside of using Visual Studio. Anyone got recommended
reading or example code for this?
Andrew