plznospam@xxxxxxxxx wrote:
Have bi-directional stream exchange between the raw operating system audio and JACK (jackaudio.org).
In other words, the audio samples rendered through Windows should be available in a user-space application instead of being sent to a DAC, and the samples recorded from the microphone should be read from user-space memory instead of from an ADC.
Since JACK (a really potent audio framework) is used, it would be beneficial to have very little latency between both systems.
My initial approach is thus to modify the SaveData part of MSVAD and share a fixed-size buffer between the driver and the JACK user-space application.
Now from most research it seems that this ultimately will require IOCTL structures to break the boundary between kernel and user space (in a way that is regarded as sane and not a massive security hole).
I combined both of these resources with the MS samples about IOCTL (github.com/microsoft/Windows-driver-samples/blob/master/general/ioctl/wdm/sys/sioctl.c) and ended up with most of the required boilerplate for the driver (which is at the very bottom). But it fails. Installing the driver is no problem as is evident by the kernel debug traces. As soon as an application tries to create a handle to the driver with CreateFile() or as soon as you manually inspect its properties with WinObj, you get a fatal system error (STATUS_ACCESS_VIOLATION):
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature