[wdmaudiodev] Re: sAPO

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 2 Apr 2019 18:42:28 +0000

I don’t know whether it will work to use .c and .cpp in the same project. Try 
it and see. If it doesn’t work, you may need to convert the C code to C++.

You can hook into the capture graph in precisely the same way you can hook into 
the render graph – by setting the FX\... properties on the KSCATEGORY_AUDIO 
interface exposed by the underlying driver. You would just hook into the 
KSCATEGORY_AUDIO interface that powers the microphone, rather than the one that 
powers the speaker.

It is possible that for your audio driver of interest, the same interface 
powers both the microphone and the speaker, in which case you can use 
FX\PKEY_FX_Association to specify a particular KSPIN_DESCRIPTOR.Category of 
interest.

It is even possible that the microphone and the speaker have the same 
KSPIN_DESCRIPTOR.Category value, e.g. KSNODETYPE_HEADSET. In such a case you 
have to register for both the capture and render paths, and just go into no-op 
mode when you are invoked on the render path.

The microphone path supports LFX and GFX, just as the speaker path does. A 
minor difference is that audio flows through the GFX first, and then to the 
various instances of the LFX.

The sample is here:
https://github.com/Microsoft/Windows-driver-samples/tree/master/audio/sysvad/APO/SwapAPO

The documentation is here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/audio-processing-object-architecture

If you have specific questions, or if you run into trouble, let us know.

From: amd 22102018<mailto:amd22102018@xxxxxxxxx>
Sent: Tuesday, April 2, 2019 11:28 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: sAPO

My algorithm contains various(2 to 3) modules which includes various header 
files and .c source files.
How ever my Slate Audio Sample code and Swap apo is written in .cpp and this 
algorithm is MATLAB converted .c files. Is it Ok in using both c and C++ in 
single project.

In SwapAPO in APOProcess "process swap" which is present in swap.cpp is doing 
the job.

First my job is to hook this New APO to audio engine and to the Slate Audio 
Sample Driver and to get initialization and APOProcess calls from the audio 
driver.

I want to hook this to the capture graph. How can this be done. I know I 
capture graph we can't implement Effects as GFX it can only be implemented as 
LFX.

Please help me in doing this,share the sample documents and samples or links if 
any.



On Tue, 2 Apr 2019, 11:44 p.m. Matthew van Eerde, 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>> wrote:
Start with SwapAPO, which is already hooked up to the .inf, and has the 
necessary hooks.

Change the CLSIDs to avoid collisions with other APOs that started with SwapAPO.

Change the implementation of APOProcess to use your custom processing instead 
of swapping the left and right channels.


From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Help Engineers 
<helpforengineers2017@xxxxxxxxx<mailto:helpforengineers2017@xxxxxxxxx>>
Sent: Tuesday, April 2, 2019 11:07:30 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] sAPO

How to convert the existing MATLAB Algorithm.which I've converted to the C Code 
using MATLAB Coder as the sAPO. How can it be Converted to the Dll by adding 
Entry Point Function to it i.e DllMain.
I've tried this by creating ATL Project and tried to replicate the swapapo. But 
I'm confused.

This is the  flow of SWAPAPO

Initialize
IsInputFormatSupported
IsOutputFormatSupported
LockForProcess
APOProcess
UnlockProcess

Provide me the sample algorithm which can be converted to the sAPO and hook to 
the Audio Driver via the entries in INF.

Tell me how to proceed with some examples.

From where can i get the Code of the Plugins(Effects) present in Audacity.

Note:- Don't tell me to go through APOProcess

PNG image

Other related posts: