[wdmaudiodev] Re: Desktop app comm with sAPO

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 23 Apr 2014 10:41:36 -0700

Dave Kvach wrote:
> Can anyone shed some light on the proper way to communicate with a GFX APO 
> from a desktop app?
>
> I basically want to pass some parameters that control an audio DSP effect 
> implemented in the APO from an application.
>
> I’ve pored through these archives/MSDN/Google/etc and the best I can come up 
> with is maybe creating a custom property store in the registry to handle the 
> communications.  
>
> If anyone has any insight or specific examples it would be most appreciated… 
> MSDN has been of very little help.

It's not actually very hard to do this.  It's easier than doing the same
operation in DirectShow, and that's hard for me to admit, because I
really like DirectShow.

    CComPtr<IMMDeviceEnumerator> pEnumerator;
    pEnumerator.CoCreateInstance( CLSID_MMDeviceEnumerator );
    CComPtr<IMMDevice> pEndpoint;
    pEnumerator->GetDefaultAudioEndpoint( eRender, eMultimedia,
&pEndpoint );
    CComPtr<IPropertyStore> pProperty;
    pEndpoint->OpenPropertyStore( STGM_READWRITE, &pProperty );

Now you can dink with the properties.  You have to be "special" to write
to the property store.

It may even be possible to use IMMDevice::Activate to fetch a custom
interface implemented by your GFX APO, but I haven't tried that.  The
documentation for IMMDevice::Activate says it only works for a small set
of interfaces, but there's an MSDN page that shows it being used with
IKsControl, which is not on the list.

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: