# -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright Â© 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 2 of the License, or (at your option)
# any later version.
#
# EventGhost is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with EventGhost. If not, see <http://www.gnu.org/licenses/>.

from ctypes import sizeof, HRESULT
from ctypes.wintypes import FLOAT# , ULONG
from comtypes import GUID
from propertystore import PROPERTYKEY


def _HRESULT_TYPEDEF_(_sc):
    return HRESULT(_sc)


def AUDCLNT_ERR(code):
    return (SEVERITY_ERROR << 31) | (FACILITY_AUDCLNT << 16) | code


def AUDCLNT_SUCCESS(code):
    return (SEVERITY_SUCCESS << 31) | (FACILITY_AUDCLNT << 16) | code


def CTL_CODE(DeviceType, Function, Method, Access):
    return DeviceType << 16 | Access << 14 | Function << 2 | Method


def _convert_guid(*hex_guid):
    guid = []
    hex_four = ''
    hex_twelve = ''
    for h in hex_guid:
        h = hex(h)[2:].replace('L', '')

        if len(h) not in (8, 4, 2):
            h = '0' + h

        if len(h) == 2:
            if hex_four is not None and hex_four:
                h = hex_four + h
                hex_four = None
            elif hex_four is None:
                hex_twelve += h
                if len(hex_twelve) == 12:
                    h = hex_twelve
                else:
                    continue
            else:
                hex_four = h
                continue
        guid += [h.upper()]

    guid = '{' + '-'.join(guid) + '}'
    return guid


def DEFINE_PROPERTYKEY(*hex_guid):
    guid = _convert_guid(*hex_guid[:-1])
    index = hex_guid[-1]

    return PROPERTYKEY(GUID(guid), index)


def DEFINE_GUIDNAMED(*hex_guid):
    return GUID(_convert_guid(*hex_guid))


def DEFINE_USB_TERMINAL_GUID(*hex_code):
    return (
        0xDFF219E0 + hex_code[0],
        0xF70F,
        0x11D0,
        0xB9,
        0x17,
        0x00,
        0xA0,
        0xC9,
        0x22,
        0x31,
        0x96
    )


S_OK = 0x00000000

STGM_READ = 0x00000000
STGM_WRITE = 0x00000001
STGM_READWRITE = 0x00000002

DEVICE_STATE_ACTIVE = 0x00000001
DEVICE_STATE_DISABLED = 0x00000002
DEVICE_STATE_NOTPRESENT = 0x00000004
DEVICE_STATE_UNPLUGGED = 0x00000008
DEVICE_STATE_MASK_ALL = 0x0000000F

ENDPOINT_HARDWARE_SUPPORT_VOLUME = 0x00000001
ENDPOINT_HARDWARE_SUPPORT_MUTE = 0x00000002
ENDPOINT_HARDWARE_SUPPORT_METER = 0x00000004

AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED = 0x10000000
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE = 0x20000000
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED = 0x40000000

AUDIOMEDIATYPE_EQUAL_FORMAT_TYPES = 0x00000002
AUDIOMEDIATYPE_EQUAL_FORMAT_DATA = 0x00000004
AUDIOMEDIATYPE_EQUAL_FORMAT_USER_DATA = 0x00000008

AUDCLNT_STREAMFLAGS_CROSSPROCESS = 0x00010000
AUDCLNT_STREAMFLAGS_LOOPBACK = 0x00020000
AUDCLNT_STREAMFLAGS_EVENTCALLBACK = 0x00040000
AUDCLNT_STREAMFLAGS_NOPERSIST = 0x00080000
AUDCLNT_STREAMFLAGS_RATEADJUST = 0x00100000
AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY = 0x08000000
AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM = 0x80000000

ENDPOINT_SYSFX_ENABLED = 0x00000000
ENDPOINT_SYSFX_DISABLED = 0x00000001

JACKDESC2_PRESENCE_DETECT_CAPABILITY = 0x00000001
JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY = 0x00000002

APO_CONNECTION_DESCRIPTOR_SIGNATURE = 'ACDS'
APO_CONNECTION_PROPERTY_SIGNATURE = 'ACPS'

AUDIO_MIN_CHANNELS = 1
AUDIO_MAX_CHANNELS = 4096

AUDIO_MIN_FRAMERATE = 10.0
AUDIO_MAX_FRAMERATE = 384000.0

# The object has already been initialized.
APOERR_ALREADY_INITIALIZED = _HRESULT_TYPEDEF_(0x887D0001)
# Object/structure is not initialized.
APOERR_NOT_INITIALIZED = _HRESULT_TYPEDEF_(0x887D0002)
# a pin supporting the format cannot be found.
APOERR_FORMAT_NOT_SUPPORTED = _HRESULT_TYPEDEF_(0x887D0003)
# Invalid CLSID in an APO Initialization structure
APOERR_INVALID_APO_CLSID = _HRESULT_TYPEDEF_(0x887D0004)
# Buffers overlap on an APO that does not accept in-place buffers.
APOERR_BUFFERS_OVERLAP = _HRESULT_TYPEDEF_(0x887D0005)
# APO is already in an unlocked state
APOERR_ALREADY_UNLOCKED = _HRESULT_TYPEDEF_(0x887D0006)
# number of input or output connections not valid on this APO
APOERR_NUM_CONNECTIONS_INVALID = _HRESULT_TYPEDEF_(0x887D0007)
# Output maxFrameCount not large enough.
APOERR_INVALID_OUTPUT_MAXFRAMECOUNT = _HRESULT_TYPEDEF_(0x887D0008)
# Invalid connection format for this operation
APOERR_INVALID_CONNECTION_FORMAT = _HRESULT_TYPEDEF_(0x887D0009)
# APO is locked ready to process and can not be changed
APOERR_APO_LOCKED = _HRESULT_TYPEDEF_(0x887D000A)
# Invalid coefficient count
APOERR_INVALID_COEFFCOUNT = _HRESULT_TYPEDEF_(0x887D000B)
# Invalid coefficient
APOERR_INVALID_COEFFICIENT = _HRESULT_TYPEDEF_(0x887D000C)
# an invalid curve parameter was specified
APOERR_INVALID_CURVE_PARAM = _HRESULT_TYPEDEF_(0x887D000D)

MAX_SINK_DESCRIPTION_NAME_LENGTH = 32

FACILITY_AUDCLNT = 2185
SEVERITY_SUCCESS = 0
SEVERITY_ERROR = 1


AUDCLNT_E_NOT_INITIALIZED = AUDCLNT_ERR(0x001)
AUDCLNT_E_ALREADY_INITIALIZED = AUDCLNT_ERR(0x002)
AUDCLNT_E_WRONG_ENDPOINT_TYPE = AUDCLNT_ERR(0x003)
AUDCLNT_E_DEVICE_INVALIDATED = AUDCLNT_ERR(0x004)
AUDCLNT_E_NOT_STOPPED = AUDCLNT_ERR(0x005)
AUDCLNT_E_BUFFER_TOO_LARGE = AUDCLNT_ERR(0x006)
AUDCLNT_E_OUT_OF_ORDER = AUDCLNT_ERR(0x007)
AUDCLNT_E_UNSUPPORTED_FORMAT = AUDCLNT_ERR(0x008)
AUDCLNT_E_INVALID_SIZE = AUDCLNT_ERR(0x009)
AUDCLNT_E_DEVICE_IN_USE = AUDCLNT_ERR(0x00a)
AUDCLNT_E_BUFFER_OPERATION_PENDING = AUDCLNT_ERR(0x00b)
AUDCLNT_E_THREAD_NOT_REGISTERED = AUDCLNT_ERR(0x00c)
AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED = AUDCLNT_ERR(0x00e)
AUDCLNT_E_ENDPOINT_CREATE_FAILED = AUDCLNT_ERR(0x00f)
AUDCLNT_E_SERVICE_NOT_RUNNING = AUDCLNT_ERR(0x010)
AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED = AUDCLNT_ERR(0x011)
AUDCLNT_E_EXCLUSIVE_MODE_ONLY = AUDCLNT_ERR(0x012)
AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL = AUDCLNT_ERR(0x013)
AUDCLNT_E_EVENTHANDLE_NOT_SET = AUDCLNT_ERR(0x014)
AUDCLNT_E_INCORRECT_BUFFER_SIZE = AUDCLNT_ERR(0x015)
AUDCLNT_E_BUFFER_SIZE_ERROR = AUDCLNT_ERR(0x016)
AUDCLNT_E_CPUUSAGE_EXCEEDED = AUDCLNT_ERR(0x017)
AUDCLNT_E_BUFFER_ERROR = AUDCLNT_ERR(0x018)
AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED = AUDCLNT_ERR(0x019)
AUDCLNT_E_INVALID_DEVICE_PERIOD = AUDCLNT_ERR(0x020)
AUDCLNT_E_INVALID_STREAM_FLAG = AUDCLNT_ERR(0x021)
AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE = AUDCLNT_ERR(0x022)
AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES = AUDCLNT_ERR(0x023)
AUDCLNT_E_OFFLOAD_MODE_ONLY = AUDCLNT_ERR(0x024)
AUDCLNT_E_NONOFFLOAD_MODE_ONLY = AUDCLNT_ERR(0x025)
AUDCLNT_E_RESOURCES_INVALIDATED = AUDCLNT_ERR(0x026)
AUDCLNT_E_RAW_MODE_UNSUPPORTED = AUDCLNT_ERR(0x027)
AUDCLNT_E_ENGINE_PERIODICITY_LOCKED = AUDCLNT_ERR(0x028)
AUDCLNT_E_ENGINE_FORMAT_LOCKED = AUDCLNT_ERR(0x029)
AUDCLNT_S_BUFFER_EMPTY = AUDCLNT_SUCCESS(0x001)
AUDCLNT_S_THREAD_ALREADY_REGISTERED = AUDCLNT_SUCCESS(0x002)
AUDCLNT_S_POSITION_STALLED = AUDCLNT_SUCCESS(0x003)


SPATIAL_AUDIO_STANDARD_COMMANDS_START = 200
SPATIAL_AUDIO_POSITION = SPATIAL_AUDIO_STANDARD_COMMANDS_START
SPATIAL_AUDIO_POSITION_BYTE_COUNT = sizeof(FLOAT) * 3


SPTLAUD_MD_CLNT_E_COMMAND_NOT_FOUND = AUDCLNT_ERR(0x0200)
SPTLAUD_MD_CLNT_E_OBJECT_NOT_INITIALIZED = AUDCLNT_ERR(0x0201)
SPTLAUD_MD_CLNT_E_INVALID_ARGS = AUDCLNT_ERR(0x0202)
SPTLAUD_MD_CLNT_E_METADATA_FORMAT_NOT_FOUND = AUDCLNT_ERR(0x0203)
SPTLAUD_MD_CLNT_E_VALUE_BUFFER_INCORRECT_SIZE = AUDCLNT_ERR(0x0204)
SPTLAUD_MD_CLNT_E_MEMORY_BOUNDS = AUDCLNT_ERR(0x0205)
SPTLAUD_MD_CLNT_E_NO_MORE_COMMANDS = AUDCLNT_ERR(0x0206)
SPTLAUD_MD_CLNT_E_BUFFER_ALREADY_ATTACHED = AUDCLNT_ERR(0x0207)
SPTLAUD_MD_CLNT_E_BUFFER_NOT_ATTACHED = AUDCLNT_ERR(0x0208)
SPTLAUD_MD_CLNT_E_FRAMECOUNT_OUT_OF_RANGE = AUDCLNT_ERR(0x0209)
SPTLAUD_MD_CLNT_E_NO_ITEMS_FOUND = AUDCLNT_ERR(0x0210)
SPTLAUD_MD_CLNT_E_ITEM_COPY_OVERFLOW = AUDCLNT_ERR(0x0211)
SPTLAUD_MD_CLNT_E_NO_ITEMS_OPEN = AUDCLNT_ERR(0x0212)
SPTLAUD_MD_CLNT_E_ITEMS_ALREADY_OPEN = AUDCLNT_ERR(0x0213)
SPTLAUD_MD_CLNT_E_ATTACH_FAILED_INTERNAL_BUFFER = AUDCLNT_ERR(0x0214)
SPTLAUD_MD_CLNT_E_DETACH_FAILED_INTERNAL_BUFFER = AUDCLNT_ERR(0x0215)
SPTLAUD_MD_CLNT_E_NO_BUFFER_ATTACHED = AUDCLNT_ERR(0x0216)
SPTLAUD_MD_CLNT_E_NO_MORE_ITEMS = AUDCLNT_ERR(0x0217)
SPTLAUD_MD_CLNT_E_FRAMEOFFSET_OUT_OF_RANGE = AUDCLNT_ERR(0x0218)
SPTLAUD_MD_CLNT_E_ITEM_MUST_HAVE_COMMANDS = AUDCLNT_ERR(0x0219)
SPTLAUD_MD_CLNT_E_NO_ITEMOFFSET_WRITTEN = AUDCLNT_ERR(0x0220)
SPTLAUD_MD_CLNT_E_NO_ITEMS_WRITTEN = AUDCLNT_ERR(0x0221)
SPTLAUD_MD_CLNT_E_COMMAND_ALREADY_WRITTEN = AUDCLNT_ERR(0x0222)
SPTLAUD_MD_CLNT_E_FORMAT_MISMATCH = AUDCLNT_ERR(0x0223)
SPTLAUD_MD_CLNT_E_BUFFER_STILL_ATTACHED = AUDCLNT_ERR(0x0224)
SPTLAUD_MD_CLNT_E_ITEMS_LOCKED_FOR_WRITING = AUDCLNT_ERR(0x0225)


SPTLAUDCLNT_E_DESTROYED = AUDCLNT_ERR(0x0100)
SPTLAUDCLNT_E_OUT_OF_ORDER = AUDCLNT_ERR(0x0101)
SPTLAUDCLNT_E_RESOURCES_INVALIDATED = AUDCLNT_ERR(0x0102)
SPTLAUDCLNT_E_NO_MORE_OBJECTS = AUDCLNT_ERR(0x0103)
SPTLAUDCLNT_E_PROPERTY_NOT_SUPPORTED = AUDCLNT_ERR(0x0104)
SPTLAUDCLNT_E_ERRORS_IN_OBJECT_CALLS = AUDCLNT_ERR(0x0105)
SPTLAUDCLNT_E_METADATA_FORMAT_NOT_SUPPORTED = AUDCLNT_ERR(0x0106)
SPTLAUDCLNT_E_STREAM_NOT_AVAILABLE = AUDCLNT_ERR(0x0107)
SPTLAUDCLNT_E_INVALID_LICENSE = AUDCLNT_ERR(0x0108)
SPTLAUDCLNT_E_STREAM_NOT_STOPPED = AUDCLNT_ERR(0x010a)
SPTLAUDCLNT_E_STATIC_OBJECT_NOT_AVAILABLE = AUDCLNT_ERR(0x010b)
SPTLAUDCLNT_E_OBJECT_ALREADY_ACTIVE = AUDCLNT_ERR(0x010c)
SPTLAUDCLNT_E_INTERNAL = AUDCLNT_ERR(0x010d)


DEVPKEY_DeviceClass_IconPath = DEFINE_PROPERTYKEY(
    0x259abffc,
    0x50a7,
    0x47ce,
    0xaf,
    0x8,
    0x68,
    0xc9,
    0xa7,
    0xd7,
    0x33,
    0x66,
    12
)

STATIC_KSNODETYPE_SWSYNTH = (
    0x423274A0L,
    0x8B81,
    0x11D1,
    0xA0,
    0x50,
    0x00,
    0x00,
    0xF8,
    0x00,
    0x47,
    0x88
)
KSNODETYPE_SWSYNTH = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SWSYNTH
)
STATIC_KSNODETYPE_SWMIDI = (
    0xCB9BEFA0L,
    0xA251,
    0x11D1,
    0xA0,
    0x50,
    0x00,
    0x00,
    0xF8,
    0x00,
    0x47,
    0x88
)
KSNODETYPE_SWMIDI = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SWMIDI
)
STATIC_KSNODETYPE_DRM_DESCRAMBLE = (
    0xFFBB6E3FL,
    0xCCFE,
    0x4D84,
    0x90,
    0xD9,
    0x42,
    0x14,
    0x18,
    0xB0,
    0x3A,
    0x8E
)
KSNODETYPE_DRM_DESCRAMBLE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DRM_DESCRAMBLE
)
STATIC_KSNODETYPE_TELEPHONY_BIDI = (
    0x686d7cc0,
    0xd903,
    0x4258,
    0xb4,
    0x43,
    0x3a,
    0x3d,
    0x35,
    0x80,
    0x74,
    0x1c
)
KSNODETYPE_TELEPHONY_BIDI = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_TELEPHONY_BIDI
)
STATIC_KSNODETYPE_FM_RX = (
    0x834a733c,
    0xf485,
    0x41c0,
    0xa6,
    0x2b,
    0x51,
    0x30,
    0x25,
    0x1,
    0x4e,
    0x40
)
KSNODETYPE_FM_RX = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_FM_RX
)
STATIC_KSNODETYPE_INPUT_UNDEFINED = DEFINE_USB_TERMINAL_GUID(0x0200)
KSNODETYPE_INPUT_UNDEFINED = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_INPUT_UNDEFINED
)
STATIC_KSNODETYPE_MICROPHONE = DEFINE_USB_TERMINAL_GUID(0x0201)
KSNODETYPE_MICROPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MICROPHONE
)
STATIC_KSNODETYPE_DESKTOP_MICROPHONE = DEFINE_USB_TERMINAL_GUID(0x0202)
KSNODETYPE_DESKTOP_MICROPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DESKTOP_MICROPHONE
)
STATIC_KSNODETYPE_PERSONAL_MICROPHONE = DEFINE_USB_TERMINAL_GUID(0x0203)
KSNODETYPE_PERSONAL_MICROPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PERSONAL_MICROPHONE
)
STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE = DEFINE_USB_TERMINAL_GUID(
    0x0204
)
KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE
)
STATIC_KSNODETYPE_MICROPHONE_ARRAY = DEFINE_USB_TERMINAL_GUID(0x0205)
KSNODETYPE_MICROPHONE_ARRAY = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MICROPHONE_ARRAY
)
STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY = DEFINE_USB_TERMINAL_GUID(
    0x0206
)
KSNODETYPE_PROCESSING_MICROPHONE_ARRAY = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY
)
STATIC_KSNODETYPE_OUTPUT_UNDEFINED = DEFINE_USB_TERMINAL_GUID(0x0300)
KSNODETYPE_OUTPUT_UNDEFINED = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_OUTPUT_UNDEFINED
)
STATIC_KSNODETYPE_SPEAKER = DEFINE_USB_TERMINAL_GUID(0x0301)
KSNODETYPE_SPEAKER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SPEAKER
)
STATIC_KSNODETYPE_HEADPHONES = DEFINE_USB_TERMINAL_GUID(0x0302)
KSNODETYPE_HEADPHONES = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_HEADPHONES
)
STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO = DEFINE_USB_TERMINAL_GUID(0x0303)
KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO
)
STATIC_KSNODETYPE_DESKTOP_SPEAKER = DEFINE_USB_TERMINAL_GUID(0x0304)
KSNODETYPE_DESKTOP_SPEAKER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DESKTOP_SPEAKER
)
STATIC_KSNODETYPE_ROOM_SPEAKER = DEFINE_USB_TERMINAL_GUID(0x0305)
KSNODETYPE_ROOM_SPEAKER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_ROOM_SPEAKER
)
STATIC_KSNODETYPE_COMMUNICATION_SPEAKER = DEFINE_USB_TERMINAL_GUID(0x0306)
KSNODETYPE_COMMUNICATION_SPEAKER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_COMMUNICATION_SPEAKER
)
STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER = DEFINE_USB_TERMINAL_GUID(
    0x0307
)
KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER
)
STATIC_KSNODETYPE_BIDIRECTIONAL_UNDEFINED = DEFINE_USB_TERMINAL_GUID(0x0400)
KSNODETYPE_BIDIRECTIONAL_UNDEFINED = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_BIDIRECTIONAL_UNDEFINED
)
STATIC_KSNODETYPE_HANDSET = DEFINE_USB_TERMINAL_GUID(0x0401)
KSNODETYPE_HANDSET = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_HANDSET
)
KSNODETYPE_HEADSET_MICROPHONE = KSNODETYPE_PERSONAL_MICROPHONE

# define = KSNODETYPE_HEADSET_SPEAKERS KSNODETYPE_COMMUNICATION_SPEAKER

STATIC_KSNODETYPE_HEADSET = DEFINE_USB_TERMINAL_GUID(0x0402)
KSNODETYPE_HEADSET = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_HEADSET
)
STATIC_KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION = DEFINE_USB_TERMINAL_GUID(
    0x0403
)
KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION
)
STATIC_KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE = DEFINE_USB_TERMINAL_GUID(
    0x0404
)
KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE
)
STATIC_KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE = DEFINE_USB_TERMINAL_GUID(
    0x0405
)
KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE
)
STATIC_KSNODETYPE_TELEPHONY_UNDEFINED = DEFINE_USB_TERMINAL_GUID(0x0500)
KSNODETYPE_TELEPHONY_UNDEFINED = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_TELEPHONY_UNDEFINED
)
STATIC_KSNODETYPE_PHONE_LINE = DEFINE_USB_TERMINAL_GUID(0x0501)
KSNODETYPE_PHONE_LINE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PHONE_LINE
)
STATIC_KSNODETYPE_TELEPHONE = DEFINE_USB_TERMINAL_GUID(0x0502)
KSNODETYPE_TELEPHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_TELEPHONE
)
STATIC_KSNODETYPE_DOWN_LINE_PHONE = DEFINE_USB_TERMINAL_GUID(0x0503)
KSNODETYPE_DOWN_LINE_PHONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DOWN_LINE_PHONE
)
STATIC_KSNODETYPE_EXTERNAL_UNDEFINED = DEFINE_USB_TERMINAL_GUID(0x0600)
KSNODETYPE_EXTERNAL_UNDEFINED = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_EXTERNAL_UNDEFINED
)
STATIC_KSNODETYPE_ANALOG_CONNECTOR = DEFINE_USB_TERMINAL_GUID(0x601)
KSNODETYPE_ANALOG_CONNECTOR = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_ANALOG_CONNECTOR
)
STATIC_KSNODETYPE_DIGITAL_AUDIO_INTERFACE = DEFINE_USB_TERMINAL_GUID(0x0602)
KSNODETYPE_DIGITAL_AUDIO_INTERFACE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DIGITAL_AUDIO_INTERFACE
)
STATIC_KSNODETYPE_LINE_CONNECTOR = DEFINE_USB_TERMINAL_GUID(0x0603)
KSNODETYPE_LINE_CONNECTOR = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_LINE_CONNECTOR
)
STATIC_KSNODETYPE_LEGACY_AUDIO_CONNECTOR = DEFINE_USB_TERMINAL_GUID(0x0604)
KSNODETYPE_LEGACY_AUDIO_CONNECTOR = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_LEGACY_AUDIO_CONNECTOR
)
STATIC_KSNODETYPE_SPDIF_INTERFACE = DEFINE_USB_TERMINAL_GUID(0x0605)
KSNODETYPE_SPDIF_INTERFACE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SPDIF_INTERFACE
)
STATIC_KSNODETYPE_1394_DA_STREAM = DEFINE_USB_TERMINAL_GUID(0x0606)
KSNODETYPE_1394_DA_STREAM = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_1394_DA_STREAM
)
STATIC_KSNODETYPE_1394_DV_STREAM_SOUNDTRACK = DEFINE_USB_TERMINAL_GUID(0x0607)
KSNODETYPE_1394_DV_STREAM_SOUNDTRACK = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_1394_DV_STREAM_SOUNDTRACK
)
STATIC_KSNODETYPE_EMBEDDED_UNDEFINED = DEFINE_USB_TERMINAL_GUID(0x0700)
KSNODETYPE_EMBEDDED_UNDEFINED = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_EMBEDDED_UNDEFINED
)
STATIC_KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE = DEFINE_USB_TERMINAL_GUID(
    0x0701
)
KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE
)
STATIC_KSNODETYPE_EQUALIZATION_NOISE = DEFINE_USB_TERMINAL_GUID(0x0702)
KSNODETYPE_EQUALIZATION_NOISE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_EQUALIZATION_NOISE
)
STATIC_KSNODETYPE_CD_PLAYER = DEFINE_USB_TERMINAL_GUID(0x0703)
KSNODETYPE_CD_PLAYER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_CD_PLAYER
)
STATIC_KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE = DEFINE_USB_TERMINAL_GUID(0x0704)
KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE
)
STATIC_KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE = DEFINE_USB_TERMINAL_GUID(
    0x0705
)
KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE
)
STATIC_KSNODETYPE_MINIDISK = DEFINE_USB_TERMINAL_GUID(0x0706)
KSNODETYPE_MINIDISK = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MINIDISK
)
STATIC_KSNODETYPE_ANALOG_TAPE = DEFINE_USB_TERMINAL_GUID(0x0707)
KSNODETYPE_ANALOG_TAPE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_ANALOG_TAPE
)
STATIC_KSNODETYPE_PHONOGRAPH = DEFINE_USB_TERMINAL_GUID(0x0708)
KSNODETYPE_PHONOGRAPH = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PHONOGRAPH
)
STATIC_KSNODETYPE_VCR_AUDIO = DEFINE_USB_TERMINAL_GUID(0x0708)
KSNODETYPE_VCR_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_VCR_AUDIO
)
STATIC_KSNODETYPE_VIDEO_DISC_AUDIO = DEFINE_USB_TERMINAL_GUID(0x070A)
KSNODETYPE_VIDEO_DISC_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_VIDEO_DISC_AUDIO
)
STATIC_KSNODETYPE_DVD_AUDIO = DEFINE_USB_TERMINAL_GUID(0x070B)
KSNODETYPE_DVD_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DVD_AUDIO
)
STATIC_KSNODETYPE_TV_TUNER_AUDIO = DEFINE_USB_TERMINAL_GUID(0x070C)
KSNODETYPE_TV_TUNER_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_TV_TUNER_AUDIO
)
STATIC_KSNODETYPE_SATELLITE_RECEIVER_AUDIO = DEFINE_USB_TERMINAL_GUID(0x070D)
KSNODETYPE_SATELLITE_RECEIVER_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SATELLITE_RECEIVER_AUDIO
)
STATIC_KSNODETYPE_CABLE_TUNER_AUDIO = DEFINE_USB_TERMINAL_GUID(0x070E)
KSNODETYPE_CABLE_TUNER_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_CABLE_TUNER_AUDIO
)
STATIC_KSNODETYPE_DSS_AUDIO = DEFINE_USB_TERMINAL_GUID(0x070F)
KSNODETYPE_DSS_AUDIO = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DSS_AUDIO
)
STATIC_KSNODETYPE_RADIO_RECEIVER = DEFINE_USB_TERMINAL_GUID(0x0710)
KSNODETYPE_RADIO_RECEIVER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_RADIO_RECEIVER
)
STATIC_KSNODETYPE_RADIO_TRANSMITTER = DEFINE_USB_TERMINAL_GUID(0x0711)
KSNODETYPE_RADIO_TRANSMITTER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_RADIO_TRANSMITTER
)
STATIC_KSNODETYPE_MULTITRACK_RECORDER = DEFINE_USB_TERMINAL_GUID(0x0712)
KSNODETYPE_MULTITRACK_RECORDER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MULTITRACK_RECORDER
)
STATIC_KSNODETYPE_SYNTHESIZER = DEFINE_USB_TERMINAL_GUID(0x0713)
KSNODETYPE_SYNTHESIZER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SYNTHESIZER
)
STATIC_KSNODETYPE_HDMI_INTERFACE = (
    0xd1b9cc2a,
    0xf519,
    0x417f,
    0x91,
    0xc9,
    0x55,
    0xfa,
    0x65,
    0x48,
    0x10,
    0x01
)
KSNODETYPE_HDMI_INTERFACE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_HDMI_INTERFACE
)
STATIC_KSNODETYPE_DISPLAYPORT_INTERFACE = (
    0xe47e4031,
    0x3ea6,
    0x418d,
    0x8f,
    0x9b,
    0xb7,
    0x38,
    0x43,
    0xcc,
    0xba,
    0x97
)
KSNODETYPE_DISPLAYPORT_INTERFACE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DISPLAYPORT_INTERFACE
)
STATIC_KSNODETYPE_AUDIO_LOOPBACK = (
    0x8f42c0b2,
    0x91ce,
    0x4bcf,
    0x9c,
    0xcd,
    0xe,
    0x59,
    0x90,
    0x37,
    0xab,
    0x35
)
KSNODETYPE_AUDIO_LOOPBACK = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_AUDIO_LOOPBACK
)
STATIC_KSNODETYPE_AUDIO_KEYWORDDETECTOR = (
    0x3817e0b8,
    0xdf58,
    0x4375,
    0xb6,
    0x69,
    0xc4,
    0x96,
    0x34,
    0x33,
    0x1f,
    0x9d
)
KSNODETYPE_AUDIO_KEYWORDDETECTOR = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_AUDIO_KEYWORDDETECTOR
)
STATIC_KSNODETYPE_MIDI_JACK = (
    0x265e0c3f,
    0xfa39,
    0x4df3,
    0xab,
    0x04,
    0xbe,
    0x01,
    0xb9,
    0x1e,
    0x29,
    0x9a
)
KSNODETYPE_MIDI_JACK = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MIDI_JACK
)
STATIC_KSNODETYPE_MIDI_ELEMENT = (
    0x01c6fe66,
    0x6e48,
    0x4c65,
    0xac,
    0x9b,
    0x52,
    0xdb,
    0x5d,
    0x65,
    0x6c,
    0x7e
)
KSNODETYPE_MIDI_ELEMENT = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MIDI_ELEMENT
)
STATIC_KSNODETYPE_AUDIO_ENGINE = (
    0x35caf6e4,
    0xf3b3,
    0x4168,
    0xbb,
    0x4b,
    0x55,
    0xe7,
    0x7a,
    0x46,
    0x1c,
    0x7e
)
KSNODETYPE_AUDIO_ENGINE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_AUDIO_ENGINE
)
STATIC_KSNODETYPE_SPEAKERS_STATIC_JACK = (
    0x28e04f87,
    0x4dbe,
    0x4f8d,
    0x85,
    0x89,
    0x2,
    0x5d,
    0x20,
    0x9d,
    0xfb,
    0x4a
)
KSNODETYPE_SPEAKERS_STATIC_JACK = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SPEAKERS_STATIC_JACK
)
STATIC_KSNODETYPE_DAC = (
    0x507AE360L,
    0xC554,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_DAC = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DAC
)
STATIC_KSNODETYPE_ADC = (
    0x4D837FE0L,
    0xC555,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_ADC = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_ADC
)
STATIC_KSNODETYPE_SRC = (
    0x9DB7B9E0L,
    0xC555,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_SRC = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SRC
)
STATIC_KSNODETYPE_SUPERMIX = (
    0xE573ADC0L,
    0xC555,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_SUPERMIX = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SUPERMIX
)
STATIC_KSNODETYPE_MUX = (
    0x2CEAF780L,
    0xC556,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_MUX = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MUX
)
STATIC_KSNODETYPE_DEMUX = (
    0xC0EB67D4L,
    0xE807,
    0x11D0,
    0x95,
    0x8A,
    0x00,
    0xC0,
    0x4F,
    0xB9,
    0x25,
    0xD3
)
KSNODETYPE_DEMUX = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DEMUX
)
STATIC_KSNODETYPE_SUM = (
    0xDA441A60L,
    0xC556,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_SUM = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_SUM
)
STATIC_KSNODETYPE_MUTE = (
    0x02B223C0L,
    0xC557,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_MUTE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_MUTE
)
STATIC_KSNODETYPE_VOLUME = (
    0x3A5ACC00L,
    0xC557,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_VOLUME = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_VOLUME
)
STATIC_KSNODETYPE_TONE = (
    0x7607E580L,
    0xC557,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_TONE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_TONE
)
STATIC_KSNODETYPE_EQUALIZER = (
    0x9D41B4A0L,
    0xC557,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_EQUALIZER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_EQUALIZER
)
STATIC_KSNODETYPE_AGC = (
    0xE88C9BA0L,
    0xC557,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_AGC = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_AGC
)
STATIC_KSNODETYPE_NOISE_SUPPRESS = (
    0xe07f903f,
    0x62fd,
    0x4e60,
    0x8c,
    0xdd,
    0xde,
    0xa7,
    0x23,
    0x66,
    0x65,
    0xb5
)
KSNODETYPE_NOISE_SUPPRESS = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_NOISE_SUPPRESS
)
STATIC_KSNODETYPE_DELAY = (
    0x144981E0L,
    0xC558,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_DELAY = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DELAY
)
STATIC_KSNODETYPE_LOUDNESS = (
    0x41887440L,
    0xC558,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_LOUDNESS = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_LOUDNESS
)
STATIC_KSNODETYPE_PROLOGIC_DECODER = (
    0x831C2C80L,
    0xC558,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_PROLOGIC_DECODER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PROLOGIC_DECODER
)
STATIC_KSNODETYPE_STEREO_WIDE = (
    0xA9E69800L,
    0xC558,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_STEREO_WIDE = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_STEREO_WIDE
)
STATIC_KSNODETYPE_REVERB = (
    0xEF0328E0L,
    0xC558,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_REVERB = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_REVERB
)
STATIC_KSNODETYPE_CHORUS = (
    0x20173F20L,
    0xC559,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_CHORUS = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_CHORUS
)
STATIC_KSNODETYPE_3D_EFFECTS = (
    0x55515860L,
    0xC559,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_3D_EFFECTS = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_3D_EFFECTS
)
STATIC_KSNODETYPE_PARAMETRIC_EQUALIZER = (
    0x19bb3a6a,
    0xce2b,
    0x4442,
    0x87,
    0xec,
    0x67,
    0x27,
    0xc3,
    0xca,
    0xb4,
    0x77
)
KSNODETYPE_PARAMETRIC_EQUALIZER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PARAMETRIC_EQUALIZER
)
STATIC_KSNODETYPE_UPDOWN_MIX = (
    0xb7edc5cf,
    0x7b63,
    0x4ee2,
    0xa1,
    0x0,
    0x29,
    0xee,
    0x2c,
    0xb6,
    0xb2,
    0xde
)
KSNODETYPE_UPDOWN_MIX = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_UPDOWN_MIX
)
STATIC_KSNODETYPE_DYN_RANGE_COMPRESSOR = (
    0x8c8a6a8,
    0x601f,
    0x4af8,
    0x87,
    0x93,
    0xd9,
    0x5,
    0xff,
    0x4c,
    0xa9,
    0x7d
)
KSNODETYPE_DYN_RANGE_COMPRESSOR = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DYN_RANGE_COMPRESSOR
)

STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR = (
    0x830a44f2,
    0xa32d,
    0x476b,
    0xbe,
    0x97,
    0x42,
    0x84,
    0x56,
    0x73,
    0xb3,
    0x5a
)
KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR
)

STATIC_KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR = (
    STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR
)
KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR = (
    KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR
)

STATIC_KSNODETYPE_DEV_SPECIFIC = (
    0x941C7AC0L,
    0xC559,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSNODETYPE_DEV_SPECIFIC = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_DEV_SPECIFIC
)
STATIC_KSNODETYPE_PROLOGIC_ENCODER = (
    0x8074C5B2L,
    0x3C66,
    0x11D2,
    0xB4,
    0x5A,
    0x30,
    0x78,
    0x30,
    0x2C,
    0x20,
    0x30
)
KSNODETYPE_PROLOGIC_ENCODER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PROLOGIC_ENCODER
)

STATIC_KSNODETYPE_PEAKMETER = (
    0xa085651eL,
    0x5f0d,
    0x4b36,
    0xa8,
    0x69,
    0xd1,
    0x95,
    0xd6,
    0xab,
    0x4b,
    0x9e
)
KSNODETYPE_PEAKMETER = DEFINE_GUIDNAMED(
    *STATIC_KSNODETYPE_PEAKMETER
)

PKEY_Device_FriendlyName = DEFINE_PROPERTYKEY(
    0xA45C254E,
    0xDF1C,
    0x4EFD,
    0x80,
    0x20,
    0x67,
    0xD1,
    0x46,
    0xA8,
    0x50,
    0xE0,
    14
)
PKEY_Device_DeviceDesc = DEFINE_PROPERTYKEY(
    0xA45C254E,
    0xDF1C,
    0x4EFD,
    0x80,
    0x20,
    0x67,
    0xD1,
    0x46,
    0xA8,
    0x50,
    0xE0,
    2
)
PKEY_DeviceInterface_FriendlyName = DEFINE_PROPERTYKEY(
    0x026E516E,
    0xB814,
    0x414B,
    0x83,
    0xCD,
    0x85,
    0x6D,
    0x6F,
    0xEF,
    0x48,
    0x22,
    2
)
PKEY_AudioEndpoint_FormFactor = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        0
    )
)
PKEY_AudioEndpoint_ControlPanelPageProvider = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        1
    )
)
PKEY_AudioEndpoint_Association = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        2
    )
)
PKEY_AudioEndpoint_PhysicalSpeakers = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        3
    )
)
PKEY_AudioEndpoint_GUID = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        4
    )
)
PKEY_AudioEndpoint_Disable_SysFx = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        5
    )
)
PKEY_AudioEndpoint_FullRangeSpeakers = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        6
    )
)
PKEY_AudioEndpoint_Supports_EventDriven_Mode = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        7
    )
)
PKEY_AudioEndpoint_JackSubType = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        8
    )
)
PKEY_AudioEndpoint_Default_VolumeInDb = (
    DEFINE_PROPERTYKEY(
        0x1da5d803,
        0xd492,
        0x4edd,
        0x8c,
        0x23,
        0xe0,
        0xc0,
        0xff,
        0xee,
        0x7f,
        0x0e,
        9
    )
)
PKEY_AudioEngine_DeviceFormat = (
    DEFINE_PROPERTYKEY(
        0xf19f064d,
        0x82c,
        0x4e27,
        0xbc,
        0x73,
        0x68,
        0x82,
        0xa1,
        0xbb,
        0x8e,
        0x4c,
        0
    )
)
PKEY_AudioEngine_OEMFormat = (
    DEFINE_PROPERTYKEY(
        0xe4870e26,
        0x3cc5,
        0x4cd2,
        0xba,
        0x46,
        0xca,
        0xa,
        0x9a,
        0x70,
        0xed,
        0x4,
        3
    )
)
PKEY_AudioEndpointLogo_IconEffects = (
    DEFINE_PROPERTYKEY(
        0xf1ab780d,
        0x2010,
        0x4ed3,
        0xa3,
        0xa6,
        0x8b,
        0x87,
        0xf0,
        0xf0,
        0xc4,
        0x76,
        0
    )
)
PKEY_AudioEndpointLogo_IconPath = (
    DEFINE_PROPERTYKEY(
        0xf1ab780d,
        0x2010,
        0x4ed3,
        0xa3,
        0xa6,
        0x8b,
        0x87,
        0xf0,
        0xf0,
        0xc4,
        0x76,
        1
    )
)
PKEY_AudioEndpointSettings_MenuText = (
    DEFINE_PROPERTYKEY(
        0x14242002,
        0x0320,
        0x4de4,
        0x95,
        0x55,
        0xa7,
        0xd8,
        0x2b,
        0x73,
        0xc2,
        0x86,
        0
    )
)
PKEY_AudioEndpointSettings_LaunchContract = (
    DEFINE_PROPERTYKEY(
        0x14242002,
        0x0320,
        0x4de4,
        0x95,
        0x55,
        0xa7,
        0xd8,
        0x2b,
        0x73,
        0xc2,
        0x86,
        1
    )
)
DEVPKEY_AudioEndpointPlugin_FactoryCLSID = (
    DEFINE_PROPERTYKEY(
        0x12d83bd7,
        0xcf12,
        0x46be,
        0x85,
        0x40,
        0x81,
        0x27,
        0x10,
        0xd3,
        0x2,
        0x1c,
        1
    )
)
DEVPKEY_AudioEndpointPlugin_DataFlow = (
    DEFINE_PROPERTYKEY(
        0x12d83bd7,
        0xcf12,
        0x46be,
        0x85,
        0x40,
        0x81,
        0x27,
        0x10,
        0xd3,
        0x2,
        0x1c,
        2
    )
)
DEVPKEY_AudioEndpointPlugin_PnPInterface = (
    DEFINE_PROPERTYKEY(
        0x12d83bd7,
        0xcf12,
        0x46be,
        0x85,
        0x40,
        0x81,
        0x27,
        0x10,
        0xd3,
        0x2,
        0x1c,
        3
    )
)
PKEY_FX_Association = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        0
    )
)
PKEY_FX_PreMixEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        1
    )
)
PKEY_FX_PostMixEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        2
    )
)
PKEY_FX_UserInterfaceClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        3
    )
)
PKEY_FX_FriendlyName = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        4
    )
)
PKEY_FX_StreamEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        5
    )
)
PKEY_FX_ModeEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        6
    )
)
PKEY_FX_EndpointEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        7
    )
)
PKEY_FX_KeywordDetector_StreamEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        8
    )
)
PKEY_FX_KeywordDetector_ModeEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        9
    )
)
PKEY_FX_KeywordDetector_EndpointEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        10
    )
)
PKEY_FX_Offload_StreamEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        11
    )
)
PKEY_FX_Offload_ModeEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        12
    )
)
PKEY_CompositeFX_StreamEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        13
    )
)
PKEY_CompositeFX_ModeEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        14
    )
)
PKEY_CompositeFX_EndpointEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        15
    )
)
PKEY_CompositeFX_KeywordDetector_StreamEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        16
    )
)
PKEY_CompositeFX_KeywordDetector_ModeEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        17
    )
)
PKEY_CompositeFX_KeywordDetector_EndpointEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        18
    )
)
PKEY_CompositeFX_Offload_StreamEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        19
    )
)
PKEY_CompositeFX_Offload_ModeEffectClsid = (
    DEFINE_PROPERTYKEY(
        0xD04E05A6,
        0x594B,
        0x4fb6,
        0xA8,
        0x0D,
        0x01,
        0xAF,
        0x5E,
        0xED,
        0x7D,
        0x1D,
        20
    )
)
PKEY_SFX_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        5
    )
)
PKEY_MFX_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        6
    )
)
PKEY_EFX_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        7
    )
)
PKEY_SFX_KeywordDetector_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        8
    )
)
PKEY_MFX_KeywordDetector_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        9
    )
)
PKEY_EFX_KeywordDetector_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        10
    )
)
PKEY_SFX_Offload_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        11
    )
)
PKEY_MFX_Offload_ProcessingModes_Supported_For_Streaming = (
    DEFINE_PROPERTYKEY(
        0xd3993a3f,
        0x99c2,
        0x4402,
        0xb5,
        0xec,
        0xa9,
        0x2a,
        0x3,
        0x67,
        0x66,
        0x4b,
        12
    )
)


SPEAKER_FRONT_LEFT = 0x1
SPEAKER_FRONT_RIGHT = 0x2
SPEAKER_FRONT_CENTER = 0x4
SPEAKER_LOW_FREQUENCY = 0x8
SPEAKER_BACK_LEFT = 0x10
SPEAKER_BACK_RIGHT = 0x20
SPEAKER_FRONT_LEFT_OF_CENTER = 0x40
SPEAKER_FRONT_RIGHT_OF_CENTER = 0x80
SPEAKER_BACK_CENTER = 0x100
SPEAKER_SIDE_LEFT = 0x200
SPEAKER_SIDE_RIGHT = 0x400
SPEAKER_TOP_CENTER = 0x800
SPEAKER_TOP_FRONT_LEFT = 0x1000
SPEAKER_TOP_FRONT_CENTER = 0x2000
SPEAKER_TOP_FRONT_RIGHT = 0x4000
SPEAKER_TOP_BACK_LEFT = 0x8000
SPEAKER_TOP_BACK_CENTER = 0x10000
SPEAKER_TOP_BACK_RIGHT = 0x20000
# Bit mask locations reserved for future use
SPEAKER_RESERVED = 0x7FFC0000
# Used to specify that any possible permutation of speaker configurations
SPEAKER_ALL = 0x80000000
# DirectSound Speaker Config
KSAUDIO_SPEAKER_DIRECTOUT = 0
KSAUDIO_SPEAKER_MONO = SPEAKER_FRONT_CENTER
KSAUDIO_SPEAKER_1POINT1 = (
    SPEAKER_FRONT_CENTER |
    SPEAKER_LOW_FREQUENCY
)
KSAUDIO_SPEAKER_STEREO = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT
)
KSAUDIO_SPEAKER_2POINT1 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_LOW_FREQUENCY
)
KSAUDIO_SPEAKER_3POINT0 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER
)
KSAUDIO_SPEAKER_3POINT1 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_LOW_FREQUENCY
)
KSAUDIO_SPEAKER_QUAD = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_BACK_LEFT |
    SPEAKER_BACK_RIGHT
)

KSAUDIO_SPEAKER_SURROUND = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_BACK_CENTER
)
KSAUDIO_SPEAKER_5POINT0 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_SIDE_LEFT |
    SPEAKER_SIDE_RIGHT
)
KSAUDIO_SPEAKER_5POINT1 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_LOW_FREQUENCY |
    SPEAKER_BACK_LEFT |
    SPEAKER_BACK_RIGHT
)
KSAUDIO_SPEAKER_7POINT0 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_BACK_LEFT |
    SPEAKER_BACK_RIGHT |
    SPEAKER_SIDE_LEFT |
    SPEAKER_SIDE_RIGHT
)

KSAUDIO_SPEAKER_7POINT1 = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_LOW_FREQUENCY |
    SPEAKER_BACK_LEFT |
    SPEAKER_BACK_RIGHT |
    SPEAKER_FRONT_LEFT_OF_CENTER |
    SPEAKER_FRONT_RIGHT_OF_CENTER
)
KSAUDIO_SPEAKER_5POINT1_SURROUND = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_LOW_FREQUENCY |
    SPEAKER_SIDE_LEFT |
    SPEAKER_SIDE_RIGHT
)
KSAUDIO_SPEAKER_7POINT1_SURROUND = (
    SPEAKER_FRONT_LEFT |
    SPEAKER_FRONT_RIGHT |
    SPEAKER_FRONT_CENTER |
    SPEAKER_LOW_FREQUENCY |
    SPEAKER_BACK_LEFT |
    SPEAKER_BACK_RIGHT |
    SPEAKER_SIDE_LEFT |
    SPEAKER_SIDE_RIGHT
)
# The following are obsolete 5.1 and 7.1 settings (they lack side speakers).
# Note this means
# that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and
# KSAUDIO_SPEAKER_7POINT1 are
# similarly obsolete but are unchanged for compatibility reasons).
KSAUDIO_SPEAKER_5POINT1_BACK = KSAUDIO_SPEAKER_5POINT1
KSAUDIO_SPEAKER_7POINT1_WIDE = KSAUDIO_SPEAKER_7POINT1
# DVD Speaker Positions
KSAUDIO_SPEAKER_GROUND_FRONT_LEFT = SPEAKER_FRONT_LEFT
KSAUDIO_SPEAKER_GROUND_FRONT_CENTER = SPEAKER_FRONT_CENTER
KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT = SPEAKER_FRONT_RIGHT
KSAUDIO_SPEAKER_GROUND_REAR_LEFT = SPEAKER_BACK_LEFT
KSAUDIO_SPEAKER_GROUND_REAR_RIGHT = SPEAKER_BACK_RIGHT
KSAUDIO_SPEAKER_TOP_MIDDLE = SPEAKER_TOP_CENTER
KSAUDIO_SPEAKER_SUPER_WOOFER = SPEAKER_LOW_FREQUENCY

STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL = (
    0xBF963D80L,
    0xC559,
    0x11D0,
    0x8A,
    0x2B,
    0x00,
    0xA0,
    0xC9,
    0x25,
    0x5A,
    0xC1
)
KSCATEGORY_ACOUSTIC_ECHO_CANCEL = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL
)

KSNODETYPE_ACOUSTIC_ECHO_CANCEL = KSCATEGORY_ACOUSTIC_ECHO_CANCEL


STATIC_KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL = (
    0x1c22c56dL,
    0x9879,
    0x4f5b,
    0xa3,
    0x89,
    0x27,
    0x99,
    0x6d,
    0xdc,
    0x28,
    0x10
)
KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL = DEFINE_GUIDNAMED(
    *STATIC_KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL
)
STATIC_KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS = (
    0x5ab0882eL,
    0x7274,
    0x4516,
    0x87,
    0x7d,
    0x4e,
    0xee,
    0x99,
    0xba,
    0x4f,
    0xd0
)
KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS = DEFINE_GUIDNAMED(
    *STATIC_KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS
)
STATIC_KSALGORITHMINSTANCE_SYSTEM_AGC = (
    0x950e55b9L,
    0x877c,
    0x4c67,
    0xbe,
    0x8,
    0xe4,
    0x7b,
    0x56,
    0x11,
    0x13,
    0xa
)
KSALGORITHMINSTANCE_SYSTEM_AGC = DEFINE_GUIDNAMED(
    *STATIC_KSALGORITHMINSTANCE_SYSTEM_AGC
)
STATIC_KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR = (
    0xB6F5A0A0L,
    0x9E61,
    0x4F8C,
    0x91,
    0xE3,
    0x76,
    0xCF,
    0xF,
    0x3C,
    0x47,
    0x1F
)
KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR = DEFINE_GUIDNAMED(
    *STATIC_KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR
)

STATIC_KSPROPTYPESETID_General = (
    0x97E99BA0L,
    0xBDEA,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSPROPTYPESETID_General = DEFINE_GUIDNAMED(
    *STATIC_KSPROPTYPESETID_General
)
STATIC_KSPROPSETID_General = (
    0x1464EDA5L,
    0x6A8F,
    0x11D1,
    0x9A,
    0xA7,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSPROPSETID_General = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_General
)
STATIC_KSMETHODSETID_StreamIo = (
    0x65D003CAL,
    0x1523,
    0x11D2,
    0xB2,
    0x7A,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSMETHODSETID_StreamIo = DEFINE_GUIDNAMED(
    *STATIC_KSMETHODSETID_StreamIo
)
STATIC_KSPROPSETID_MediaSeeking = (
    0xEE904F0CL,
    0xD09B,
    0x11D0,
    0xAB,
    0xE9,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSPROPSETID_MediaSeeking = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_MediaSeeking
)

STATIC_KSPROPSETID_Topology = (
    0x720D4AC0L,
    0x7533,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSPROPSETID_Topology = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_Topology
)

STATIC_KSCATEGORY_BRIDGE = (
    0x085AFF00L,
    0x62CE,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_BRIDGE = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_BRIDGE
)
STATIC_KSCATEGORY_CAPTURE = (
    0x65E8773DL,
    0x8F56,
    0x11D0,
    0xA3,
    0xB9,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_CAPTURE = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_CAPTURE
)
STATIC_KSCATEGORY_VIDEO_CAMERA = (
    0xe5323777,
    0xf976,
    0x4f5b,
    0x9b,
    0x55,
    0xb9,
    0x46,
    0x99,
    0xc4,
    0x6e,
    0x44
)
KSCATEGORY_VIDEO_CAMERA = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_VIDEO_CAMERA
)
STATIC_KSCATEGORY_SENSOR_CAMERA = (
    0x24e552d7,
    0x6523,
    0x47f7,
    0xa6,
    0x47,
    0xd3,
    0x46,
    0x5b,
    0xf1,
    0xf5,
    0xca
)
KSCATEGORY_SENSOR_CAMERA = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_SENSOR_CAMERA
)
STATIC_KSCATEGORY_SENSOR_GROUP = (
    0x669C7214,
    0x0A88,
    0x4311,
    0xA7,
    0xF3,
    0x4E,
    0x79,
    0x82,
    0x0E,
    0x33,
    0xBD
)
KSCATEGORY_SENSOR_GROUP = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_SENSOR_GROUP
)
STATIC_KSCATEGORY_RENDER = (
    0x65E8773EL,
    0x8F56,
    0x11D0,
    0xA3,
    0xB9,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_RENDER = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_RENDER
)
STATIC_KSCATEGORY_MIXER = (
    0xAD809C00L,
    0x7B88,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_MIXER = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_MIXER
)
STATIC_KSCATEGORY_SPLITTER = (
    0x0A4252A0L,
    0x7E70,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_SPLITTER = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_SPLITTER
)
STATIC_KSCATEGORY_DATACOMPRESSOR = (
    0x1E84C900L,
    0x7E70,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_DATACOMPRESSOR = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_DATACOMPRESSOR
)
STATIC_KSCATEGORY_DATADECOMPRESSOR = (
    0x2721AE20L,
    0x7E70,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_DATADECOMPRESSOR = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_DATADECOMPRESSOR
)
STATIC_KSCATEGORY_DATATRANSFORM = (
    0x2EB07EA0L,
    0x7E70,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_DATATRANSFORM = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_DATATRANSFORM
)
STATIC_KSMFT_CATEGORY_VIDEO_DECODER = (
    0xd6c02d4b,
    0x6833,
    0x45b4,
    0x97,
    0x1a,
    0x05,
    0xa4,
    0xb0,
    0x4b,
    0xab,
    0x91
)
KSMFT_CATEGORY_VIDEO_DECODER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_VIDEO_DECODER
)
STATIC_KSMFT_CATEGORY_VIDEO_ENCODER = (
    0xf79eac7d,
    0xe545,
    0x4387,
    0xbd,
    0xee,
    0xd6,
    0x47,
    0xd7,
    0xbd,
    0xe4,
    0x2a
)
KSMFT_CATEGORY_VIDEO_ENCODER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_VIDEO_ENCODER
)
STATIC_KSMFT_CATEGORY_VIDEO_EFFECT = (
    0x12e17c21,
    0x532c,
    0x4a6e,
    0x8a,
    0x1c,
    0x40,
    0x82,
    0x5a,
    0x73,
    0x63,
    0x97
)
KSMFT_CATEGORY_VIDEO_EFFECT = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_VIDEO_EFFECT
)
STATIC_KSMFT_CATEGORY_MULTIPLEXER = (
    0x059c561e,
    0x05ae,
    0x4b61,
    0xb6,
    0x9d,
    0x55,
    0xb6,
    0x1e,
    0xe5,
    0x4a,
    0x7b
)
KSMFT_CATEGORY_MULTIPLEXER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_MULTIPLEXER
)
STATIC_KSMFT_CATEGORY_DEMULTIPLEXER = (
    0xa8700a7a,
    0x939b,
    0x44c5,
    0x99,
    0xd7,
    0x76,
    0x22,
    0x6b,
    0x23,
    0xb3,
    0xf1
)
KSMFT_CATEGORY_DEMULTIPLEXER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_DEMULTIPLEXER
)
STATIC_KSMFT_CATEGORY_AUDIO_DECODER = (
    0x9ea73fb4,
    0xef7a,
    0x4559,
    0x8d,
    0x5d,
    0x71,
    0x9d,
    0x8f,
    0x04,
    0x26,
    0xc7
)
KSMFT_CATEGORY_AUDIO_DECODER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_AUDIO_DECODER
)
STATIC_KSMFT_CATEGORY_AUDIO_ENCODER = (
    0x91c64bd0,
    0xf91e,
    0x4d8c,
    0x92,
    0x76,
    0xdb,
    0x24,
    0x82,
    0x79,
    0xd9,
    0x75
)
KSMFT_CATEGORY_AUDIO_ENCODER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_AUDIO_ENCODER
)
STATIC_KSMFT_CATEGORY_AUDIO_EFFECT = (
    0x11064c48,
    0x3648,
    0x4ed0,
    0x93,
    0x2e,
    0x05,
    0xce,
    0x8a,
    0xc8,
    0x11,
    0xb7
)
KSMFT_CATEGORY_AUDIO_EFFECT = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_AUDIO_EFFECT
)
STATIC_KSMFT_CATEGORY_VIDEO_PROCESSOR = (
    0x302ea3fc,
    0xaa5f,
    0x47f9,
    0x9f,
    0x7a,
    0xc2,
    0x18,
    0x8b,
    0xb1,
    0x63,
    0x2
)
KSMFT_CATEGORY_VIDEO_PROCESSOR = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_VIDEO_PROCESSOR
)
STATIC_KSMFT_CATEGORY_OTHER = (
    0x90175d57,
    0xb7ea,
    0x4901,
    0xae,
    0xb3,
    0x93,
    0x3a,
    0x87,
    0x47,
    0x75,
    0x6f
)
KSMFT_CATEGORY_OTHER = DEFINE_GUIDNAMED(
    *STATIC_KSMFT_CATEGORY_OTHER
)
STATIC_KSCATEGORY_COMMUNICATIONSTRANSFORM = (
    0xCF1DDA2CL,
    0x9743,
    0x11D0,
    0xA3,
    0xEE,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_COMMUNICATIONSTRANSFORM = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_COMMUNICATIONSTRANSFORM
)
STATIC_KSCATEGORY_INTERFACETRANSFORM = (
    0xCF1DDA2DL,
    0x9743,
    0x11D0,
    0xA3,
    0xEE,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_INTERFACETRANSFORM = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_INTERFACETRANSFORM
)
STATIC_KSCATEGORY_MEDIUMTRANSFORM = (
    0xCF1DDA2EL,
    0x9743,
    0x11D0,
    0xA3,
    0xEE,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_MEDIUMTRANSFORM = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_MEDIUMTRANSFORM
)
STATIC_KSCATEGORY_FILESYSTEM = (
    0x760FED5EL,
    0x9357,
    0x11D0,
    0xA3,
    0xCC,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_FILESYSTEM = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_FILESYSTEM
)
STATIC_KSCATEGORY_CLOCK = (
    0x53172480L,
    0x4791,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSCATEGORY_CLOCK = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_CLOCK
)
STATIC_KSCATEGORY_PROXY = (
    0x97EBAACAL,
    0x95BD,
    0x11D0,
    0xA3,
    0xEA,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_PROXY = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_PROXY
)
STATIC_KSCATEGORY_QUALITY = (
    0x97EBAACBL,
    0x95BD,
    0x11D0,
    0xA3,
    0xEA,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSCATEGORY_QUALITY = DEFINE_GUIDNAMED(
    *STATIC_KSCATEGORY_QUALITY
)

STATIC_GUID_NULL = (
    0x00000000L,
    0x0000,
    0x0000,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00
)
GUID_NULL = '{00000000-0000-0000-0000-000000000000}'
# GUID_NULL = DEFINE_GUIDNAMED(
#     *STATIC_GUID_NULL
# )

STATIC_KSTIME_FORMAT_NONE = STATIC_GUID_NULL
KSTIME_FORMAT_NONE = GUID_NULL

STATIC_KSTIME_FORMAT_FRAME = (
    0x7b785570L,
    0x8c82,
    0x11cf,
    0xbc,
    0x0c,
    0x00,
    0xaa,
    0x00,
    0xac,
    0x74,
    0xf6
)
KSTIME_FORMAT_FRAME = DEFINE_GUIDNAMED(
    *STATIC_KSTIME_FORMAT_FRAME
)
STATIC_KSTIME_FORMAT_BYTE = (
    0x7b785571L,
    0x8c82,
    0x11cf,
    0xbc,
    0x0c,
    0x00,
    0xaa,
    0x00,
    0xac,
    0x74,
    0xf6
)
KSTIME_FORMAT_BYTE = DEFINE_GUIDNAMED(
    *STATIC_KSTIME_FORMAT_BYTE
)
STATIC_KSTIME_FORMAT_SAMPLE = (
    0x7b785572L,
    0x8c82,
    0x11cf,
    0xbc,
    0x0c,
    0x00,
    0xaa,
    0x00,
    0xac,
    0x74,
    0xf6
)
KSTIME_FORMAT_SAMPLE = DEFINE_GUIDNAMED(
    *STATIC_KSTIME_FORMAT_SAMPLE
)
STATIC_KSTIME_FORMAT_FIELD = (
    0x7b785573L,
    0x8c82,
    0x11cf,
    0xbc,
    0x0c,
    0x00,
    0xaa,
    0x00,
    0xac,
    0x74,
    0xf6
)
KSTIME_FORMAT_FIELD = DEFINE_GUIDNAMED(
    *STATIC_KSTIME_FORMAT_FIELD
)
STATIC_KSTIME_FORMAT_MEDIA_TIME = (
    0x7b785574L,
    0x8c82,
    0x11cf,
    0xbc,
    0x0c,
    0x00,
    0xaa,
    0x00,
    0xac,
    0x74,
    0xf6
)
KSTIME_FORMAT_MEDIA_TIME = DEFINE_GUIDNAMED(
    *STATIC_KSTIME_FORMAT_MEDIA_TIME
)
STATIC_KSINTERFACESETID_Standard = (
    0x1A8766A0L,
    0x62CE,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSINTERFACESETID_Standard = DEFINE_GUIDNAMED(
    *STATIC_KSINTERFACESETID_Standard
)
STATIC_KSINTERFACESETID_FileIo = (
    0x8C6F932CL,
    0xE771,
    0x11D0,
    0xB8,
    0xFF,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSINTERFACESETID_FileIo = DEFINE_GUIDNAMED(
    *STATIC_KSINTERFACESETID_FileIo
)
STATIC_KSMEDIUMSETID_Standard = (
    0x4747B320L,
    0x62CE,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSMEDIUMSETID_Standard = DEFINE_GUIDNAMED(
    *STATIC_KSMEDIUMSETID_Standard
)
STATIC_KSPROPSETID_Pin = (
    0x8C134960L,
    0x51AD,
    0x11CF,
    0x87,
    0x8A,
    0x94,
    0xF8,
    0x01,
    0xC1,
    0x00,
    0x00
)
KSPROPSETID_Pin = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_Pin
)
STATIC_KSEVENTSETID_PinCapsChange = (
    0xDD4F192E,
    0x3B78,
    0x49AD,
    0xA5,
    0x34,
    0x2C,
    0x31,
    0x5b,
    0x82,
    0x20,
    0x00
)
KSEVENTSETID_PinCapsChange = DEFINE_GUIDNAMED(
    *STATIC_KSEVENTSETID_PinCapsChange
)
STATIC_KSEVENTSETID_VolumeLimit = (
    0xda168465,
    0x3a7c,
    0x4858,
    0x9d,
    0x4a,
    0x3e,
    0x8e,
    0x24,
    0x70,
    0x1a,
    0xef
)
KSEVENTSETID_VolumeLimit = DEFINE_GUIDNAMED(
    *STATIC_KSEVENTSETID_VolumeLimit
)
STATIC_KSNAME_Filter = (
    0x9b365890L,
    0x165f,
    0x11d0,
    0xa1,
    0x95,
    0x00,
    0x20,
    0xaf,
    0xd1,
    0x56,
    0xe4
)
KSNAME_Filter = DEFINE_GUIDNAMED(
    *STATIC_KSNAME_Filter
)
STATIC_KSNAME_Pin = (
    0x146F1A80L,
    0x4791,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSNAME_Pin = DEFINE_GUIDNAMED(
    *STATIC_KSNAME_Pin
)
STATIC_KSNAME_Clock = (
    0x53172480L,
    0x4791,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSNAME_Clock = DEFINE_GUIDNAMED(
    *STATIC_KSNAME_Clock
)
STATIC_KSNAME_Allocator = (
    0x642F5D00L,
    0x4791,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSNAME_Allocator = DEFINE_GUIDNAMED(
    *STATIC_KSNAME_Allocator
)
STATIC_KSNAME_TopologyNode = (
    0x0621061AL,
    0xEE75,
    0x11D0,
    0xB9,
    0x15,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSNAME_TopologyNode = DEFINE_GUIDNAMED(
    *STATIC_KSNAME_TopologyNode
)
STATIC_KSDATAFORMAT_TYPE_STREAM = (
    0xE436EB83L,
    0x524F,
    0x11CE,
    0x9F,
    0x53,
    0x00,
    0x20,
    0xAF,
    0x0B,
    0xA7,
    0x70
)
KSDATAFORMAT_TYPE_STREAM = DEFINE_GUIDNAMED(
    *STATIC_KSDATAFORMAT_TYPE_STREAM
)
STATIC_KSDATAFORMAT_SUBTYPE_NONE = (
    0xE436EB8EL,
    0x524F,
    0x11CE,
    0x9F,
    0x53,
    0x00,
    0x20,
    0xAF,
    0x0B,
    0xA7,
    0x70
)
KSDATAFORMAT_SUBTYPE_NONE = DEFINE_GUIDNAMED(
    *STATIC_KSDATAFORMAT_SUBTYPE_NONE
)
STATIC_KSDATAFORMAT_SPECIFIER_FILENAME = (
    0xAA797B40L,
    0xE974,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSDATAFORMAT_SPECIFIER_FILENAME = DEFINE_GUIDNAMED(
    *STATIC_KSDATAFORMAT_SPECIFIER_FILENAME
)
STATIC_KSDATAFORMAT_SPECIFIER_FILEHANDLE = (
    0x65E8773CL,
    0x8F56,
    0x11D0,
    0xA3,
    0xB9,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSDATAFORMAT_SPECIFIER_FILEHANDLE = DEFINE_GUIDNAMED(
    *STATIC_KSDATAFORMAT_SPECIFIER_FILEHANDLE
)
STATIC_KSDATAFORMAT_SPECIFIER_NONE = (
    0x0F6417D6L,
    0xC318,
    0x11D0,
    0xA4,
    0x3F,
    0x00,
    0xA0,
    0xC9,
    0x22,
    0x31,
    0x96
)
KSDATAFORMAT_SPECIFIER_NONE = DEFINE_GUIDNAMED(
    *STATIC_KSDATAFORMAT_SPECIFIER_NONE
)
STATIC_KSPROPSETID_Quality = (
    0xD16AD380L,
    0xAC1A,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSPROPSETID_Quality = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_Quality
)
STATIC_KSPROPSETID_Connection = (
    0x1D58C920L,
    0xAC9B,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSPROPSETID_Connection = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_Connection
)
STATIC_KSPROPSETID_MemoryTransport = (
    0xa3d1c5d,
    0x5243,
    0x4819,
    0x9e,
    0xd0,
    0xae,
    0xe8,
    0x4,
    0x4c,
    0xee,
    0x2b
)
KSPROPSETID_MemoryTransport = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_MemoryTransport
)

KSMEMORY_TYPE_WILDCARD = GUID_NULL
STATIC_KSMEMORY_TYPE_WILDCARD = STATIC_GUID_NULL

KSMEMORY_TYPE_DONT_CARE = GUID_NULL
STATIC_KSMEMORY_TYPE_DONT_CARE = STATIC_GUID_NULL

KS_TYPE_DONT_CARE = GUID_NULL
STATIC_KS_TYPE_DONT_CARE = STATIC_GUID_NULL


STATIC_KSMEMORY_TYPE_SYSTEM = (
    0x091bb638L,
    0x603f,
    0x11d1,
    0xb0,
    0x67,
    0x00,
    0xa0,
    0xc9,
    0x06,
    0x28,
    0x02
)
KSMEMORY_TYPE_SYSTEM = DEFINE_GUIDNAMED(
    *STATIC_KSMEMORY_TYPE_SYSTEM
)
STATIC_KSMEMORY_TYPE_USER = (
    0x8cb0fc28L,
    0x7893,
    0x11d1,
    0xb0,
    0x69,
    0x00,
    0xa0,
    0xc9,
    0x06,
    0x28,
    0x02
)
KSMEMORY_TYPE_USER = DEFINE_GUIDNAMED(
    *STATIC_KSMEMORY_TYPE_USER
)
STATIC_KSMEMORY_TYPE_KERNEL_PAGED = (
    0xd833f8f8L,
    0x7894,
    0x11d1,
    0xb0,
    0x69,
    0x00,
    0xa0,
    0xc9,
    0x06,
    0x28,
    0x02
)
KSMEMORY_TYPE_KERNEL_PAGED = DEFINE_GUIDNAMED(
    *STATIC_KSMEMORY_TYPE_KERNEL_PAGED
)
STATIC_KSMEMORY_TYPE_KERNEL_NONPAGED = (
    0x4a6d5fc4L,
    0x7895,
    0x11d1,
    0xb0,
    0x69,
    0x00,
    0xa0,
    0xc9,
    0x06,
    0x28,
    0x02
)
KSMEMORY_TYPE_KERNEL_NONPAGED = DEFINE_GUIDNAMED(
    *STATIC_KSMEMORY_TYPE_KERNEL_NONPAGED
)
STATIC_KSMEMORY_TYPE_DEVICE_UNKNOWN = (
    0x091bb639L,
    0x603f,
    0x11d1,
    0xb0,
    0x67,
    0x00,
    0xa0,
    0xc9,
    0x06,
    0x28,
    0x02
)
KSMEMORY_TYPE_DEVICE_UNKNOWN = DEFINE_GUIDNAMED(
    *STATIC_KSMEMORY_TYPE_DEVICE_UNKNOWN
)
STATIC_KSEVENTSETID_StreamAllocator = (
    0x75d95571L,
    0x073c,
    0x11d0,
    0xa1,
    0x61,
    0x00,
    0x20,
    0xaf,
    0xd1,
    0x56,
    0xe4
)
KSEVENTSETID_StreamAllocator = DEFINE_GUIDNAMED(
    *STATIC_KSEVENTSETID_StreamAllocator
)
STATIC_KSMETHODSETID_StreamAllocator = (
    0xcf6e4341L,
    0xec87,
    0x11cf,
    0xa1,
    0x30,
    0x00,
    0x20,
    0xaf,
    0xd1,
    0x56,
    0xe4
)
KSMETHODSETID_StreamAllocator = DEFINE_GUIDNAMED(
    *STATIC_KSMETHODSETID_StreamAllocator
)
STATIC_KSPROPSETID_StreamAllocator = (
    0xcf6e4342L,
    0xec87,
    0x11cf,
    0xa1,
    0x30,
    0x00,
    0x20,
    0xaf,
    0xd1,
    0x56,
    0xe4
)
KSPROPSETID_StreamAllocator = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_StreamAllocator
)
STATIC_KSPROPSETID_StreamInterface = (
    0x1fdd8ee1L,
    0x9cd3,
    0x11d0,
    0x82,
    0xaa,
    0x00,
    0x00,
    0xf8,
    0x22,
    0xfe,
    0x8a
)
KSPROPSETID_StreamInterface = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_StreamInterface
)
STATIC_KSPROPSETID_Stream = (
    0x65aaba60L,
    0x98ae,
    0x11cf,
    0xa1,
    0x0d,
    0x00,
    0x20,
    0xaf,
    0xd1,
    0x56,
    0xe4
)
KSPROPSETID_Stream = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_Stream
)
STATIC_KSPROPSETID_PinMDLCacheClearProp = (
    0xbd718a7b,
    0x97fc,
    0x40c7,
    0x88,
    0xce,
    0xd3,
    0xff,
    0x6,
    0xf5,
    0x5b,
    0x16
)
KSPROPSETID_PinMDLCacheClearProp = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_PinMDLCacheClearProp
)
STATIC_KSPROPSETID_Clock = (
    0xDF12A4C0L,
    0xAC17,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSPROPSETID_Clock = DEFINE_GUIDNAMED(
    *STATIC_KSPROPSETID_Clock
)
STATIC_KSEVENTSETID_Clock = (
    0x364D8E20L,
    0x62C7,
    0x11CF,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSEVENTSETID_Clock = DEFINE_GUIDNAMED(
    *STATIC_KSEVENTSETID_Clock
)
STATIC_KSEVENTSETID_Connection = (
    0x7f4bcbe0L,
    0x9ea5,
    0x11cf,
    0xa5,
    0xd6,
    0x28,
    0xdb,
    0x04,
    0xc1,
    0x00,
    0x00
)
KSEVENTSETID_Connection = DEFINE_GUIDNAMED(
    *STATIC_KSEVENTSETID_Connection
)
STATIC_KSEVENTSETID_Device = (
    0x288296ec,
    0x9f94,
    0x41b4,
    0xa1,
    0x53,
    0xaa,
    0x31,
    0xae,
    0xec,
    0xb3,
    0x3f
)
KSEVENTSETID_Device = DEFINE_GUIDNAMED(
    *STATIC_KSEVENTSETID_Device
)
STATIC_KSDEGRADESETID_Standard = (
    0x9F564180L,
    0x704C,
    0x11D0,
    0xA5,
    0xD6,
    0x28,
    0xDB,
    0x04,
    0xC1,
    0x00,
    0x00
)
KSDEGRADESETID_Standard = DEFINE_GUIDNAMED(
    *STATIC_KSDEGRADESETID_Standard
)


KSPRIORITY_LOW = 0x00000001
KSPRIORITY_NORMAL = 0x40000000
KSPRIORITY_HIGH = 0x80000000
KSPRIORITY_EXCLUSIVE = 0xFFFFFFFF

KSMETHOD_TYPE_NONE = 0x00000000
KSMETHOD_TYPE_READ = 0x00000001
KSMETHOD_TYPE_WRITE = 0x00000002
KSMETHOD_TYPE_MODIFY = 0x00000003
KSMETHOD_TYPE_SOURCE = 0x00000004
KSMETHOD_TYPE_SEND = 0x00000001
KSMETHOD_TYPE_SETSUPPORT = 0x00000100
KSMETHOD_TYPE_BASICSUPPORT = 0x00000200
KSMETHOD_TYPE_TOPOLOGY = 0x10000000
KSPROPERTY_TYPE_GET = 0x00000001
KSPROPERTY_TYPE_SET = 0x00000002
KSPROPERTY_TYPE_SETSUPPORT = 0x00000100
KSPROPERTY_TYPE_BASICSUPPORT = 0x00000200
KSPROPERTY_TYPE_RELATIONS = 0x00000400
KSPROPERTY_TYPE_SERIALIZESET = 0x00000800
KSPROPERTY_TYPE_UNSERIALIZESET = 0x00001000
KSPROPERTY_TYPE_SERIALIZERAW = 0x00002000
KSPROPERTY_TYPE_UNSERIALIZERAW = 0x00004000
KSPROPERTY_TYPE_SERIALIZESIZE = 0x00008000
KSPROPERTY_TYPE_DEFAULTVALUES = 0x00010000
KSPROPERTY_TYPE_TOPOLOGY = 0x10000000
KSPROPERTY_TYPE_HIGHPRIORITY = 0x08000000
KSPROPERTY_TYPE_FSFILTERSCOPE = 0x40000000
KSPROPERTY_TYPE_COPYPAYLOAD = 0x80000000


KSPROPERTY_MEMBER_RANGES = 0x00000001
KSPROPERTY_MEMBER_STEPPEDRANGES = 0x00000002
KSPROPERTY_MEMBER_VALUES = 0x00000003


KSPROPERTY_MEMBER_FLAG_DEFAULT = 0x00000001
KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL = 0x00000002
KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_UNIFORM = 0x00000004


KSEVENTF_EVENT_HANDLE = 0x00000001
KSEVENTF_SEMAPHORE_HANDLE = 0x00000002
KSEVENTF_EVENT_OBJECT = 0x00000004
KSEVENTF_SEMAPHORE_OBJECT = 0x00000008
KSEVENTF_DPC = 0x00000010
KSEVENTF_WORKITEM = 0x00000020
KSEVENTF_KSWORKITEM = 0x00000080
KSEVENT_TYPE_ENABLE = 0x00000001
KSEVENT_TYPE_ONESHOT = 0x00000002
KSEVENT_TYPE_ENABLEBUFFERED = 0x00000004
KSEVENT_TYPE_SETSUPPORT = 0x00000100
KSEVENT_TYPE_BASICSUPPORT = 0x00000200
KSEVENT_TYPE_QUERYBUFFER = 0x00000400
KSEVENT_TYPE_TOPOLOGY = 0x10000000

KSMEDIUM_TYPE_ANYINSTANCE = 0
KSMEDIUM_STANDARD_DEVIO = KSMEDIUM_TYPE_ANYINSTANCE

KSPROPERTY_PIN_FLAGS_ATTRIBUTE_RANGE_AWARE = 0x00000001
KSPROPERTY_PIN_FLAGS_MASK = KSPROPERTY_PIN_FLAGS_ATTRIBUTE_RANGE_AWARE

KSRELATIVEEVENT_FLAG_HANDLE = 0x00000001
KSRELATIVEEVENT_FLAG_POINTER = 0x00000002

# KSFILTER_NODE = ((ULONG) - 1)
# KSALL_NODES = ((ULONG) - 1)
# KSINSTANCE_INDETERMINATE = ((ULONG) - 1)

KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION = 0
KSDATAFORMAT_TEMPORAL_COMPRESSION = 1 << KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION
KSDATAFORMAT_BIT_ATTRIBUTES = 1
KSDATAFORMAT_ATTRIBUTES = 1 << KSDATAFORMAT_BIT_ATTRIBUTES

KSDATARANGE_BIT_ATTRIBUTES = 1
KSDATARANGE_ATTRIBUTES = 1 << KSDATARANGE_BIT_ATTRIBUTES
KSDATARANGE_BIT_REQUIRED_ATTRIBUTES = 2
KSDATARANGE_REQUIRED_ATTRIBUTES = 1 << KSDATARANGE_BIT_REQUIRED_ATTRIBUTES


KSATTRIBUTE_REQUIRED = 0x00000001

KSSTRING_Filter = "{9B365890-165F-11D0-A195-0020AFD156E4}"
KSSTRING_Pin = "{146F1A80-4791-11D0-A5D6-28DB04C10000}"
KSSTRING_Clock = "{53172480-4791-11D0-A5D6-28DB04C10000}"
KSSTRING_Allocator = "{642F5D00-4791-11D0-A5D6-28DB04C10000}"
KSSTRING_AllocatorEx = "{091BB63B-603F-11D1-B067-00A0C9062802}"
KSSTRING_TopologyNode = "{0621061A-EE75-11D0-B915-00A0C9223196}"


KSPROPERTY_MEMORY_TRANSPORT = 1
KSALLOCATOR_REQUIREMENTF_INPLACE_MODIFIER = 0x00000001
KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY = 0x00000002
KSALLOCATOR_REQUIREMENTF_FRAME_INTEGRITY = 0x00000004
KSALLOCATOR_REQUIREMENTF_MUST_ALLOCATE = 0x00000008
KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY_CUSTOM_ALLOCATION = 0x00000010
KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY = 0x80000000
KSALLOCATOR_OPTIONF_COMPATIBLE = 0x00000001
KSALLOCATOR_OPTIONF_SYSTEM_MEMORY = 0x00000002
KSALLOCATOR_OPTIONF_VALID = 0x00000003
#
# pins extended framing flags
#
KSALLOCATOR_FLAG_PARTIAL_READ_SUPPORT = 0x00000010
KSALLOCATOR_FLAG_DEVICE_SPECIFIC = 0x00000020
KSALLOCATOR_FLAG_CAN_ALLOCATE = 0x00000040
KSALLOCATOR_FLAG_INSIST_ON_FRAMESIZE_RATIO = 0x00000080
#
# allocator pipes flags
#
# there is at least one data modification in a pipe
KSALLOCATOR_FLAG_NO_FRAME_INTEGRITY = 0x00000100
KSALLOCATOR_FLAG_MULTIPLE_OUTPUT = 0x00000200
KSALLOCATOR_FLAG_CYCLE = 0x00000400
KSALLOCATOR_FLAG_ALLOCATOR_EXISTS = 0x00000800
# there is no framing dependency between neighbouring pipes.
KSALLOCATOR_FLAG_INDEPENDENT_RANGES = 0x00001000
KSALLOCATOR_FLAG_ATTENTION_STEPPING = 0x00002000
KSALLOCATOR_FLAG_ENABLE_CACHED_MDL = 0x00004000
KSALLOCATOR_FLAG_2D_BUFFER_REQUIRED = 0x00008000


KSSTREAM_HEADER_OPTIONSF_SPLICEPOINT = 0x00000001
KSSTREAM_HEADER_OPTIONSF_PREROLL = 0x00000002
KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY = 0x00000004
KSSTREAM_HEADER_OPTIONSF_TYPECHANGED = 0x00000008
KSSTREAM_HEADER_OPTIONSF_TIMEVALID = 0x00000010
KSSTREAM_HEADER_OPTIONSF_TIMEDISCONTINUITY = 0x00000040
KSSTREAM_HEADER_OPTIONSF_FLUSHONPAUSE = 0x00000080
KSSTREAM_HEADER_OPTIONSF_DURATIONVALID = 0x00000100
KSSTREAM_HEADER_OPTIONSF_ENDOFSTREAM = 0x00000200
KSSTREAM_HEADER_OPTIONSF_BUFFEREDTRANSFER = 0x00000400
KSSTREAM_HEADER_OPTIONSF_VRAM_DATA_TRANSFER = 0x00000800
KSSTREAM_HEADER_OPTIONSF_METADATA = 0x00001000
KSSTREAM_HEADER_OPTIONSF_ENDOFPHOTOSEQUENCE = 0x00002000
KSSTREAM_HEADER_OPTIONSF_FRAMEINFO = 0x00004000
#
# Start of MDL caching related definitions
#
KSSTREAM_HEADER_OPTIONSF_PERSIST_SAMPLE = 0x00008000
KSSTREAM_HEADER_OPTIONSF_SAMPLE_PERSISTED = 0x00010000
#
# This flag tells the user mode to look at frame completion numbers
#
KSSTREAM_HEADER_TRACK_COMPLETION_NUMBERS = 0x00020000
#
# End of MDL caching related definitions
KSSTREAM_HEADER_OPTIONSF_SECUREBUFFERTRANSFER = 0x00040000
KSSTREAM_HEADER_OPTIONSF_LOOPEDDATA = 0x80000000

KSFRAMETIME_VARIABLESIZE = 0x00000001

KSRATE_NOPRESENTATIONSTART = 0x00000001
KSRATE_NOPRESENTATIONDURATION = 0x00000002

NANOSECONDS = 10000000

FILE_DEVICE_KS = 0x0000002f
METHOD_NEITHER = 3
FILE_ANY_ACCESS = 0
FILE_READ_ACCESS = 0x0001
FILE_WRITE_ACCESS = 0x0002


IOCTL_KS_PROPERTY = CTL_CODE(
    FILE_DEVICE_KS,
    0x000,
    METHOD_NEITHER,
    FILE_ANY_ACCESS
)
IOCTL_KS_ENABLE_EVENT = CTL_CODE(
    FILE_DEVICE_KS,
    0x001,
    METHOD_NEITHER,
    FILE_ANY_ACCESS
)
IOCTL_KS_DISABLE_EVENT = CTL_CODE(
    FILE_DEVICE_KS,
    0x002,
    METHOD_NEITHER,
    FILE_ANY_ACCESS
)
IOCTL_KS_METHOD = CTL_CODE(
    FILE_DEVICE_KS,
    0x003,
    METHOD_NEITHER,
    FILE_ANY_ACCESS
)
IOCTL_KS_WRITE_STREAM = CTL_CODE(
    FILE_DEVICE_KS,
    0x004,
    METHOD_NEITHER, FILE_WRITE_ACCESS)
IOCTL_KS_READ_STREAM = CTL_CODE(
    FILE_DEVICE_KS,
    0x005,
    METHOD_NEITHER,
    FILE_READ_ACCESS
)
IOCTL_KS_RESET_STATE = CTL_CODE(
    FILE_DEVICE_KS,
    0x006,
    METHOD_NEITHER,
    FILE_ANY_ACCESS
)
