How to enumerate WASAPI Audio Processing Objects (APOs) on your system

Browse source

Download apoenum.exe

Pseudocode:

main() {
    UINT32 nCount;
    EnumerateAPOs(myCallback, &nCount);
    print nCount;
}

...

// called once for each APO
myCallback(PAPO_REG_PROPERTIES props, PVOID pnCount) {
    print props;
    (*pnCount)++;
}

Gotcha: the APO_REG_PROPERTIES structure is variable-size.  If you want to store the structure for later use, you need to make the copy before the callback function exits, and make sure add on the size of any additional interface IDs beyond the first (the first is included in the structure) if you want to store them too.

Output on my system:

>apoenum.exe
-- APO properties for CAudioVolume --
    clsid: {06587E71-F043-403A-BF49-CB591BA6E103}
    Flags: 0x0000000f
        APO_FLAG_INPLACE
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "CAudioVolume"
    szCopyrightInfo: "copyright (c) 2003 microsoft corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {D81229B1-5A43-480C-92F7-BE0F7F4EAB60}

-- APO properties for CAudioConstrictor --
    clsid: {07252659-BB6B-4B79-B78B-623F6699A579}
    Flags: 0x0000000f
        APO_FLAG_INPLACE
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "CAudioConstrictor"
    szCopyrightInfo: "Copyright (c) 2003 Microsoft Corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {6B54B2B5-45EE-4F11-9935-9EC3183AD534}

-- APO properties for caudiomixer --
    clsid: {12DD4DBB-532B-4FCE-8653-74CDB9C8FE5A}
    Flags: 0x0000000e
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "caudiomixer"
    szCopyrightInfo: "Copyright (C) 2003 Microsoft Corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {C23BDC7A-47F8-49A1-B750-692C35B532C3}

-- APO properties for CAudioRateConvertCMPT --
    clsid: {27C98999-2895-4829-B080-5A8B65BD3DB0}
    Flags: 0x0000000a
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "CAudioRateConvertCMPT"
    szCopyrightInfo: "Copyright (c) 2005 Microsoft Corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 3
    #1: {788F7BE2-9C40-41C0-AF05-4393FBF409F9}
    #2: {C78841EF-516F-4516-B591-F04FA93783A9}
    #3: {7BA1DB8F-78AD-49CD-9591-F79D80A17C81}

-- APO properties for caudiometer --
    clsid: {3DC09436-7D83-4BA0-ADDC-CD47F996C5BA}
    Flags: 0x0000000f
        APO_FLAG_INPLACE
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "caudiometer"
    szCopyrightInfo: "copyright (c) 2003 microsoft corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 0
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {419B26E3-FA99-4408-83DE-CC1276EFA489}

-- APO properties for caudioformatconvert --
    clsid: {3FD7F233-A716-472E-8F2F-C25954F34E96}
    Flags: 0x00000006
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
    szFriendlyName: "caudioformatconvert"
    szCopyrightInfo: "copyright (c) 2003 microsoft corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 2
    #1: {FC7DFF56-6B8D-45A9-B4CA-266F9AC21693}
    #2: {6BB6A944-7352-4327-AB91-D92607B25656}

-- APO properties for caudiomatrix --
    clsid: {541987EE-0E02-411E-9A85-1FC6156E7F4B}
    Flags: 0x0000000c
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "caudiomatrix"
    szCopyrightInfo: "copyright (c) 2003 microsoft corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {BB8B2F5D-2AF0-473F-BD94-F55A77587D3F}

-- APO properties for WM audio LFX APO --
    clsid: {62DC1A93-AE24-464C-A43E-452F824C4250}
    Flags: 0x0000000d
        APO_FLAG_INPLACE
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "WM audio LFX APO"
    szCopyrightInfo: "Copyright Microsoft"
    u32MajorVersion: 1
    u32MinorVersion: 1
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {FD7F2B29-24D0-4B5C-B177-592C39F9CA10}

-- APO properties for WM audio GFX APO --
    clsid: {637C490D-EEE3-4C0A-973F-371958802DA2}
    Flags: 0x0000000d
        APO_FLAG_INPLACE
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "WM audio GFX APO"
    szCopyrightInfo: "Copyright Microsoft"
    u32MajorVersion: 1
    u32MinorVersion: 1
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {FD7F2B29-24D0-4B5C-B177-592C39F9CA10}

-- APO properties for caudiorateconvert --
    clsid: {C58BD103-E87F-4B78-A0FA-7A5C95970EE2}
    Flags: 0x0000000a
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "caudiorateconvert"
    szCopyrightInfo: "copyright (c) 2003 microsoft corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 3
    #1: {788F7BE2-9C40-41C0-AF05-4393FBF409F9}
    #2: {C78841EF-516F-4516-B591-F04FA93783A9}
    #3: {7BA1DB8F-78AD-49CD-9591-F79D80A17C81}

-- APO properties for CAudioLimiter --
    clsid: {D69E0717-DD4B-4B25-997A-DA813833B8AC}
    Flags: 0x0000000e
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "CAudioLimiter"
    szCopyrightInfo: "Copyright (c) 2003 Microsoft Corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {7DF8824C-AEC7-4119-9425-E6979172A8AE}

-- APO properties for caudiocopy --
    clsid: {E916B6B2-22BD-4AFC-B337-D3D9FB27670E}
    Flags: 0x0000000e
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH
    szFriendlyName: "caudiocopy"
    szCopyrightInfo: "copyright (c) 2003 microsoft corporation"
    u32MajorVersion: 1
    u32MinorVersion: 0
    u32MinInputConnections: 1
    u32MaxInputConnections: 1
    u32MinOutputConnections: 1
    u32MaxOutputConnections: 1
    u32MaxInstances: 4294967295
    u32NumAPOInterfaces: 1
    #1: {ADF7583D-F947-4311-83FB-066AD4E5E7C2}

APOs found: 12

One thought on “How to enumerate WASAPI Audio Processing Objects (APOs) on your system

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s