The product I want to create is a microphone blocking application. After reading a couple of articles I started developing a Stream Effects (SFX) Audio Processing Object (APO) that would zero out the output buffers in the APOProcess method (IAudioProcessingObjectRT::APOProcess (audioenginebaseapo.h) - Win32 apps | Microsoft Learn). The issue I have is with identifying the process requesting the microphone data stream.
How should one find the process id?
I've tried implementing IAudioSessionEvents and storing process information together with the audio sessions, but I can't find any way to query the audio session identifier in the APOProcess method.
What is the correct way of implementing the APO?
Unless you have a good reason, it is doubtful that you will get much help on such a project here
I’m trying to implement a security solution to protect access to input audio devices
There is, in general, no way to associate a stream with the application that owns the stream. APOs intentionally live in a very restricted environment inside the Audio Engine.
Windows has group policy settings to disable access to the microphone, no driver required.
The cool audio driver kids all hang out on the [wdmaudiodev] list at FreeLists / WDMAUDIODEV . Several members of the Microsoft audio team also hang out there and have proven to be invaluable resources over the years.
Thank you very much, Tim!