diff --git a/reactos/include/psdk/CMakeLists.txt b/reactos/include/psdk/CMakeLists.txt index 2ca9a2fb560..a0e8a008dde 100644 --- a/reactos/include/psdk/CMakeLists.txt +++ b/reactos/include/psdk/CMakeLists.txt @@ -12,6 +12,7 @@ list(APPEND SOURCE # asynot.idl # asysta.idl atliface.idl + audioclient.idl bdaiface.idl # binres.idl bits.idl @@ -51,6 +52,7 @@ list(APPEND SOURCE mimeinfo.idl mimeole.idl mlang.idl + mmdeviceapi.idl mscoree.idl msctf.idl msdadc.idl diff --git a/reactos/include/psdk/audioclient.idl b/reactos/include/psdk/audioclient.idl new file mode 100644 index 00000000000..a7556047222 --- /dev/null +++ b/reactos/include/psdk/audioclient.idl @@ -0,0 +1,327 @@ +/* + * Core Audio audioclient definitions + * + * Copyright 2009 Maarten Lankhorst + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +import "wtypes.idl"; +import "unknwn.idl"; +import "audiosessiontypes.h"; + +/* Forward declarations */ +interface IAudioClient; +interface IAudioRenderClient; +interface IAudioCaptureClient; +interface IAudioClock; +interface IAudioClock2; +interface IAudioClockAdjustment; +interface ISimpleAudioVolume; +interface IAudioStreamVolume; +interface IChannelAudioVolume; + +cpp_quote("#if 0") +typedef struct WAVEFORMATEX /*[hidden,restricted]*/ +{ + WORD wFormatTag; + WORD nChannels; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + WORD nBlockAlign; + WORD wBitsPerSample; + WORD cbSize; +} WAVEFORMATEX; +cpp_quote("#else") +cpp_quote("#include ") +cpp_quote("#endif") + +cpp_quote("#if 0") +typedef LONGLONG /*[hidden,restricted]*/ REFERENCE_TIME; +cpp_quote("#else") +cpp_quote("#define _IKsControl_") +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#endif") + +enum _AUDCLNT_BUFFERFLAGS +{ + AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY = 0x1, + AUDCLNT_BUFFERFLAGS_SILENT = 0x2, + AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR = 0x4 +}; + +[ + local, + pointer_default(unique), + uuid(1cb9ad4c-dbfa-4c32-b178-c2f568a703b2), + object, +] +interface IAudioClient : IUnknown +{ + HRESULT Initialize( + [in] AUDCLNT_SHAREMODE ShareMode, + [in] DWORD StreamFlags, + [in] REFERENCE_TIME hnsBufferDuration, + [in] REFERENCE_TIME hnsPeriodicity, + [in] const WAVEFORMATEX *pFormat, + [in] LPCGUID AudioSessionGuid + ); + HRESULT GetBufferSize( + [out] UINT32 *pNumBufferFrames + ); + HRESULT GetStreamLatency( + [out] REFERENCE_TIME *phnsLatency + ); + HRESULT GetCurrentPadding( + [out] UINT32 *pNumPaddingFrames + ); + HRESULT IsFormatSupported( + [in] AUDCLNT_SHAREMODE ShareMode, + [in] const WAVEFORMATEX *pFormat, + [out,unique] WAVEFORMATEX **ppClosestMatch + ); + HRESULT GetMixFormat( + [out] WAVEFORMATEX **ppDeviceFormat + ); + HRESULT GetDevicePeriod( + [out] REFERENCE_TIME *phnsDefaultDevicePeriod, + [out] REFERENCE_TIME *phnsMinimumDevicePeriod + ); + HRESULT Start(void); + HRESULT Stop(void); + HRESULT Reset(void); + HRESULT SetEventHandle([in] HANDLE eventHandle); + HRESULT GetService( + [in] REFIID riid, + [iid_is(riid),out] void **ppv + ); +} + +[ + local, + pointer_default(unique), + uuid(f294acfc-3146-4483-a7bf-addca7c260e2), + object, +] +interface IAudioRenderClient : IUnknown +{ + HRESULT GetBuffer( + [in] UINT32 NumFramesRequested, + [out] BYTE **ppData + ); + HRESULT ReleaseBuffer( + [in] UINT32 NumFramesWritten, + [in] DWORD dwFlags + ); +} + +[ + local, + pointer_default(unique), + uuid(c8adbd64-e71e-48a0-a4de-185c395cd317), + object, +] +interface IAudioCaptureClient : IUnknown +{ + HRESULT GetBuffer( + [out] BYTE **ppData, + [out] UINT32 *pNumFramesToRead, + [out] DWORD *pdwFlags, + [unique,out] UINT64 *pu64DevicePosition, + [unique,out] UINT64 *pu64QPCPosition + ); + HRESULT ReleaseBuffer( + [in] UINT32 NumFramesRead + ); + HRESULT GetNextPacketSize( + [out] UINT32 *pNumFramesInNextPacket + ); +} + +cpp_quote("#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ 0x00000001") + +[ + local, + pointer_default(unique), + uuid("cd63314f-3fba-4a1b-812c-ef96358728e7"), + object, +] +interface IAudioClock : IUnknown +{ + HRESULT GetFrequency( + [out] UINT64 *pu64Frequency + ); + HRESULT GetPosition( + [out] UINT64 *pu64Position, + [out,unique] UINT64 *pu64QPCPosition + ); + HRESULT GetCharacteristics( + [out] DWORD *pdwCharacteristics + ); +} + +[ + local, + pointer_default(unique), + uuid("6f49ff73-6727-49ac-a008-d98cf5e70048"), + object, +] +interface IAudioClock2 : IUnknown +{ + HRESULT GetPosition( + [out] UINT64 *DevicePosition, + [out,unique] UINT64 *QPCPosition + ); +} + +[ + local, + pointer_default(unique), + uuid("f6e4c0a0-46d9-4fb9-be21-57a3ef2b626c"), + object, +] +interface IAudioClockAdjustment : IUnknown +{ + HRESULT SetSampleRate( + [in] float flSampleRate + ); +} + +[ + local, + pointer_default(unique), + uuid("87ce5498-68d6-44e5-9215-6da47ef883d8"), + object, +] +interface ISimpleAudioVolume : IUnknown +{ + HRESULT SetMasterVolume( + [in] float fLevel, + [unique,in] LPCGUID EventContext + ); + HRESULT GetMasterVolume( + [out] float *pfLevel + ); + HRESULT SetMute( + [in] const BOOL bMute, + [unique,in] LPCGUID EventContext + ); + HRESULT GetMute( + [out] BOOL *pbMute + ); +} + +[ + local, + pointer_default(unique), + uuid("93014887-242d-4068-8a15-cf5e93b90fe3"), + object, +] +interface IAudioStreamVolume : IUnknown +{ + HRESULT GetChannelCount( + [out] UINT32 *pdwCount + ); + HRESULT SetChannelVolume( + [in] UINT32 dwIndex, + [in] const float fLevel + ); + HRESULT GetChannelVolume( + [in] UINT32 dwIndex, + [out] float *pfLevel + ); + HRESULT SetAllVolumes( + [in] UINT32 dwCount, + [size_is(dwCount),in] const float *pfVolumes + ); + HRESULT GetAllVolumes( + [in] UINT32 dwCount, + [size_is(dwCount),out] float *pfVolumes + ); +} + +[ + local, + pointer_default(unique), + uuid("1c158861-b533-4b30-b1cf-e853e51c59b8"), + object, +] +interface IChannelAudioVolume : IUnknown +{ + HRESULT GetChannelCount( + [out] UINT32 *pdwCount + ); + HRESULT SetChannelVolume( + [in] UINT32 dwIndex, + [in] const float fLevel, + [unique,in] LPCGUID EventContext + ); + HRESULT GetChannelVolume( + [in] UINT32 dwIndex, + [out] float *pfLevel + ); + HRESULT SetAllVolumes( + [in] UINT32 dwCount, + [size_is(dwCount),in] const float *pfVolumes, + [unique,in] LPCGUID EventContext + ); + HRESULT GetAllVolumes( + [in] UINT32 dwCount, + [size_is(dwCount),out] float *pfVolumes + ); +} + +cpp_quote("#define FACILIY_AUDCLNT 0x889") +cpp_quote("#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILIY_AUDCLNT, n)") +cpp_quote("#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILIY_AUDCLNT, n)") +cpp_quote("#define AUDCLNT_E_NOT_INITIALIZED AUDCLNT_ERR(1)") +cpp_quote("#define AUDCLNT_E_ALREADY_INITIALIZED AUDCLNT_ERR(2)") +cpp_quote("#define AUDCLNT_E_WRONG_ENDPOINT_TYPE AUDCLNT_ERR(3)") +cpp_quote("#define AUDCLNT_E_DEVICE_INVALIDATED AUDCLNT_ERR(4)") +cpp_quote("#define AUDCLNT_E_NOT_STOPPED AUDCLNT_ERR(5)") +cpp_quote("#define AUDCLNT_E_BUFFER_TOO_LARGE AUDCLNT_ERR(6)") +cpp_quote("#define AUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(7)") +cpp_quote("#define AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_ERR(8)") +cpp_quote("#define AUDCLNT_E_INVALID_SIZE AUDCLNT_ERR(9)") +cpp_quote("#define AUDCLNT_E_DEVICE_IN_USE AUDCLNT_ERR(0x0a)") +cpp_quote("#define AUDCLNT_E_BUFFER_OPERATION_PENDING AUDCLNT_ERR(0x0b)") +cpp_quote("#define AUDCLNT_E_THREAD_NOT_REGISTERED AUDCLNT_ERR(0x0c)") +/* Not defined? cpp_quote("#define AUDCLNT_E_UNKNOWN_XXX1 AUDCLNT_ERR(0x0d)") */ +cpp_quote("#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x0e)") +cpp_quote("#define AUDCLNT_E_ENDPOINT_CREATE_FAILED AUDCLNT_ERR(0x0f)") +cpp_quote("#define AUDCLNT_E_SERVICE_NOT_RUNNING AUDCLNT_ERR(0x10)") +cpp_quote("#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED AUDCLNT_ERR(0x11)") +cpp_quote("#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY AUDCLNT_ERR(0x12)") +cpp_quote("#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x13)") +cpp_quote("#define AUDCLNT_E_EVENTHANDLE_NOT_SET AUDCLNT_ERR(0x14)") +cpp_quote("#define AUDCLNT_E_INCORRECT_BUFFER_SIZE AUDCLNT_ERR(0x15)") +cpp_quote("#define AUDCLNT_E_BUFFER_SIZE_ERROR AUDCLNT_ERR(0x16)") +cpp_quote("#define AUDCLNT_E_CPUUSAGE_EXCEEDED AUDCLNT_ERR(0x17)") +cpp_quote("#define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x18)") +cpp_quote("#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x19)") +/* Hex fail */ +cpp_quote("#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x20)") +cpp_quote("#define AUDCLNT_E_INVALID_STREAM_FLAG AUDCLNT_ERR(0x021)") +cpp_quote("#define AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE AUDCLNT_ERR(0x022)") +cpp_quote("#define AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES AUDCLNT_ERR(0x023)") +cpp_quote("#define AUDCLNT_E_OFFLOAD_MODE_ONLY AUDCLNT_ERR(0x024)") +cpp_quote("#define AUDCLNT_E_NONOFFLOAD_MODE_ONLY AUDCLNT_ERR(0x025)") +cpp_quote("#define AUDCLNT_E_RESOURCES_INVALIDATED AUDCLNT_ERR(0x026)") + +cpp_quote("#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x1)") +cpp_quote("#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x2)") +cpp_quote("#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x3)") diff --git a/reactos/include/psdk/audiosessiontypes.h b/reactos/include/psdk/audiosessiontypes.h new file mode 100644 index 00000000000..b9435f127fb --- /dev/null +++ b/reactos/include/psdk/audiosessiontypes.h @@ -0,0 +1,48 @@ + +/* + * Core Audio audio session types definitions + * + * Copyright 2009 Maarten Lankhorst + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#ifndef __AUDIOSESSIONTYPES__ +#define __AUDIOSESSIONTYPES__ + +typedef enum _AUDCLNT_SHAREMODE +{ + AUDCLNT_SHAREMODE_SHARED, + AUDCLNT_SHAREMODE_EXCLUSIVE, +} AUDCLNT_SHAREMODE; + +#define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000 +#define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000 +#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000 +#define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000 +#define AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000 +#define AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x10000000 +#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x20000000 +#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x40000000 + +typedef enum _AudioSessionState +{ + AudioSessionStateInactive = 0, + AudioSessionStateActive, + AudioSessionStateExpired, +} AudioSessionState; + +#endif diff --git a/reactos/include/psdk/devpkey.h b/reactos/include/psdk/devpkey.h new file mode 100644 index 00000000000..ebaabc10b5c --- /dev/null +++ b/reactos/include/psdk/devpkey.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2010 Maarten Lankhorst for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +/* TODO: Not all DEVPROPKEYS have been defined here */ + +DEFINE_DEVPROPKEY(DEVPKEY_NAME, 0xb725f130,0x47ef,0x101a,0xa5,0xf1,0x02,0x60,0x8c,0x9e,0xeb,0xac, 10); + +DEFINE_DEVPROPKEY(DEVPKEY_Device_DeviceDesc, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 2); +DEFINE_DEVPROPKEY(DEVPKEY_Device_HardwareIds, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 3); +DEFINE_DEVPROPKEY(DEVPKEY_Device_CompatibleIds, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 4); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Service, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 6); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Class, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 9); +DEFINE_DEVPROPKEY(DEVPKEY_Device_ClassGuid, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 10); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Driver, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 11); +DEFINE_DEVPROPKEY(DEVPKEY_Device_ConfigFlags, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 12); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Manufacturer, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 13); +DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 14); +DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationInfo, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 15); +DEFINE_DEVPROPKEY(DEVPKEY_Device_PDOName, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 16); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Capabilities, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 17); +DEFINE_DEVPROPKEY(DEVPKEY_Device_UINumber, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 18); +DEFINE_DEVPROPKEY(DEVPKEY_Device_UpperFilters, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 19); +DEFINE_DEVPROPKEY(DEVPKEY_Device_LowerFilters, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 20); +DEFINE_DEVPROPKEY(DEVPKEY_Device_BusTypeGuid, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 21); +DEFINE_DEVPROPKEY(DEVPKEY_Device_LegacyBusType, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 22); +DEFINE_DEVPROPKEY(DEVPKEY_Device_BusNumber, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 23); +DEFINE_DEVPROPKEY(DEVPKEY_Device_EnumeratorName, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 24); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Security, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 25); +DEFINE_DEVPROPKEY(DEVPKEY_Device_SecuritySDS, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 26); +DEFINE_DEVPROPKEY(DEVPKEY_Device_DevType, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 27); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Exclusive, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 28); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Characteristics, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 29); +DEFINE_DEVPROPKEY(DEVPKEY_Device_Address, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 30); +DEFINE_DEVPROPKEY(DEVPKEY_Device_UINumberDescFormat, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 31); +DEFINE_DEVPROPKEY(DEVPKEY_Device_PowerData, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 32); +DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicy, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 33); +DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicyDefault, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 34); +DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicyOverride, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 35); +DEFINE_DEVPROPKEY(DEVPKEY_Device_InstallState, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 36); +DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationPaths, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 37); +DEFINE_DEVPROPKEY(DEVPKEY_Device_BaseContainerId, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 38); + +DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_FriendlyName, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 2); +DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Enabled, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 3); +DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_ClassGuid, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 4); diff --git a/reactos/include/psdk/mmdeviceapi.idl b/reactos/include/psdk/mmdeviceapi.idl new file mode 100644 index 00000000000..d1fb6ae74ff --- /dev/null +++ b/reactos/include/psdk/mmdeviceapi.idl @@ -0,0 +1,250 @@ +/* + * Copyright (C) 2009 Maarten Lankhorst + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "propsys.idl"; + +cpp_quote("#ifndef E_NOTFOUND") +cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)") +cpp_quote("#endif") +cpp_quote("#ifndef E_UNSUPPORTED_TYPE") +cpp_quote("#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)") +cpp_quote("#endif") + + +cpp_quote("#define DEVICE_STATE_ACTIVE 0x1") +cpp_quote("#define DEVICE_STATE_DISABLED 0x2") +cpp_quote("#define DEVICE_STATE_NOTPRESENT 0x4") +cpp_quote("#define DEVICE_STATE_UNPLUGGED 0x8") +cpp_quote("#define DEVICE_STATEMASK_ALL 0xf") + +/* Generic PKEY_AudioEndPoint ID for grepping: {1da5d803-d492-4edd-8c23-e0c0ffee7f0e} */ +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,0);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,1);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,2);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,3);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,4);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,5);") + +cpp_quote("#define ENDPOINT_SYSFX_ENABLED 0") +cpp_quote("#define ENDPOINT_SYSFX_DISABLED 1") + +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,6);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Supports_EventDriven_Mode,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,7);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_JackSubType,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,8);") + +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat,0xf19f064d,0x082c,0x4e27,0xbc,0x73,0x68,0x82,0xa1,0xbb,0x8e,0x4c,0);") +cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_OEMFormat,0xe4870e26,0x3cc5,0x4cd2,0xba,0x46,0xca,0x0a,0x9a,0x70,0xed,0x04,3);") + +typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS +{ + DWORD cbDirectXAudioActivationParams; + GUID guidAudioSession; + DWORD dwAudioStreamFlags; +} DIRECTX_AUDIO_ACTIVATION_PARAMS, *PDIRECTX_AUDIO_ACTIVATION_PARAMS; + +typedef enum _EDataFlow +{ + eRender, + eCapture, + eAll, + EDataFlow_enum_count +} EDataFlow; + +typedef enum _ERole +{ + eConsole, + eMultimedia, + eCommunications, + ERole_enum_count +} ERole; + +typedef enum _EndpointFormFactor +{ + RemoteNetworkDevice, + Speakers, + LineLevel, + Headphones, + Microphone, + Headset, + Handset, + UnknownDigitalPassthrough, + SPDIF, + DigitalAudioDisplayDevice, + UnknownFormFactor, + EndpointFormFactor_enum_count +} EndpointFormFactor; + +cpp_quote("#define HDMI DigitalAudioDisplayDevice") + +[ + object, + local, + uuid(7991eec9-7e89-4d85-8390-6c703cec60c0), + nonextensible, + pointer_default(unique) +] +interface IMMNotificationClient : IUnknown +{ + [id(1)] HRESULT OnDeviceStateChanged( + [in] LPCWSTR pwstrDeviceId, + [in] DWORD dwNewState + ); + [id(2)] HRESULT OnDeviceAdded( + [in] LPCWSTR pwstrDeviceId + ); + [id(3)] HRESULT OnDeviceRemoved( + [in] LPCWSTR pwstrDeviceId + ); + [id(4)] HRESULT OnDefaultDeviceChanged( + [in] EDataFlow flow, + [in] ERole role, + [in] LPCWSTR pwstrDeviceId + ); + [id(5)] HRESULT OnPropertyValueChanged( + [in] LPCWSTR pwstrDeviceId, + [in] const PROPERTYKEY key + ); +} + +[ + object, + local, + uuid(d666063f-1587-4e43-81f1-b948e807363f), + nonextensible, + pointer_default(unique) +] +interface IMMDevice : IUnknown +{ + [id(1)] HRESULT Activate( + [in] REFIID iid, + [in] DWORD dwClsCtx, + [in,unique] PROPVARIANT *pActivationParams, + [out,iid_is(iid)] void **ppv + ); + [id(2)] HRESULT OpenPropertyStore( + [in] DWORD stgmAccess, + [out] IPropertyStore **ppProperties + ); + [id(3)] HRESULT GetId( + [out] LPWSTR *ppstrId + ); + [id(4)] HRESULT GetState( + [out] DWORD *pdwState + ); +} + +[ + object, + local, + uuid(0bd7a1be-7a1a-44db-8397-cc5392387b5e), + nonextensible, + pointer_default(unique) +] +interface IMMDeviceCollection : IUnknown +{ + [id(1)] HRESULT GetCount( + [out] UINT *pcDevices + ); + [id(2)] HRESULT Item( + [in] UINT nDevice, + [out] IMMDevice **ppdevice + ); +} + +[ + object, + local, + uuid(1be09788-6894-4089-8586-9a2a6c265ac5), + nonextensible, + pointer_default(unique) +] +interface IMMEndpoint : IUnknown +{ + [id(1)] HRESULT GetDataFlow( + [out] EDataFlow *pDataFlow + ); +} + +[ + object, + local, + uuid(a95664d2-9614-4f35-a746-de8db63617e6), + nonextensible, + pointer_default(unique) +] +interface IMMDeviceEnumerator : IUnknown +{ + [id(1)] HRESULT EnumAudioEndpoints( + [in] EDataFlow dataFlow, + [in] DWORD dwStateMask, + [out] IMMDeviceCollection **ppDevices + ); + [id(2)] HRESULT GetDefaultAudioEndpoint( + [in] EDataFlow dataFlow, + [in] ERole role, + [out] IMMDevice **ppEndpoint + ); + [id(3)] HRESULT GetDevice( + [in] LPCWSTR pwstrId, + [out] IMMDevice **ppDevice + ); + [id(4)] HRESULT RegisterEndpointNotificationCallback( + [in] IMMNotificationClient *pClient + ); + [id(5)] HRESULT UnregisterEndpointNotificationCallback( + [in] IMMNotificationClient *pClient + ); +} + +[ + object, + local, + uuid(3b0d0ea4-d0a9-4b0e-935b-09516746fac0), + nonextensible, + pointer_default(unique) +] +interface IMMDeviceActivator : IUnknown +{ + [id(1)] HRESULT Activate( + [in] REFIID iid, + [in] IMMDevice *pDevice, + [in] PROPVARIANT *pActivationParams, + [out,iid_is(iid)] void **ppv + ); +} + +typedef struct _AudioExtensionParams +{ + LPARAM AddPageParam; + IMMDevice *pEndPoint; + IMMDevice *pPnpInterface; + IMMDevice *pPnpDevnode; +} AudioExtensionParams; + +[ + uuid(2fdaafa3-7523-4f66-9957-9d5e7fe698f6), + version(1.0) +] +library MMDeviceAPILib +{ + [ uuid(bcde0395-e52f-467c-8e3d-c4579291692e) ] coclass MMDeviceEnumerator + { + [default] interface IMMDeviceEnumerator; + } +} diff --git a/reactos/include/psdk/mmreg.h b/reactos/include/psdk/mmreg.h index fef38c3f0ee..ea38f6adbf3 100644 --- a/reactos/include/psdk/mmreg.h +++ b/reactos/include/psdk/mmreg.h @@ -92,6 +92,7 @@ typedef const struct _WAVEFORMATEX *LPCWAVEFORMATEX; /* WAVE form wFormatTag IDs */ #define WAVE_FORMAT_UNKNOWN 0x0000 /* Microsoft Corporation */ #define WAVE_FORMAT_ADPCM 0x0002 /* Microsoft Corporation */ +#define WAVE_FORMAT_IEEE_FLOAT 0x0003 /* Microsoft Corporation */ #define WAVE_FORMAT_IBM_CVSD 0x0005 /* IBM Corporation */ #define WAVE_FORMAT_ALAW 0x0006 /* Microsoft Corporation */ #define WAVE_FORMAT_MULAW 0x0007 /* Microsoft Corporation */ diff --git a/reactos/include/psdk/propkey.h b/reactos/include/psdk/propkey.h new file mode 100644 index 00000000000..de57e028d1d --- /dev/null +++ b/reactos/include/psdk/propkey.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2010 Maarten Lankhorst for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _INC_PROPKEY +#define _INC_PROPKEY + +#include + +DEFINE_PROPERTYKEY(PKEY_Audio_ChannelCount, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 7); +DEFINE_PROPERTYKEY(PKEY_Audio_Compression, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 10); +DEFINE_PROPERTYKEY(PKEY_Audio_Format, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 2); +DEFINE_PROPERTYKEY(PKEY_Audio_IsVariableBitRate, 0xe6822fee, 0x8c17, 0x4d62, 0x82, 0x3c, 0x8e, 0x9c, 0xfc, 0xbd, 0x1d, 0x5c, 100); +DEFINE_PROPERTYKEY(PKEY_Audio_PeakValue, 0x2579e5d0, 0x1116, 0x4084, 0xbd, 0x9a, 0x9b, 0x4f, 0x7c, 0xb4, 0xdf, 0x5e, 100); +DEFINE_PROPERTYKEY(PKEY_Audio_SampleRate, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 5); +DEFINE_PROPERTYKEY(PKEY_Audio_SampleSize, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 6); +DEFINE_PROPERTYKEY(PKEY_Audio_StreamName, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 9); +DEFINE_PROPERTYKEY(PKEY_Audio_StreamNumber, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 8); + +DEFINE_PROPERTYKEY(PKEY_Title, 0xf29f85e0,0x4ff9,0x1068,0xab,0x91,0x08,0x00,0x2b,0x27,0xb3,0xd9,2); + +DEFINE_PROPERTYKEY(PKEY_ItemName, 0x6b8da074,0x3b5c,0x43bc,0x88,0x6f,0x0a,0x2c,0xdc,0xe0,0x0b,0x6f,100); + +DEFINE_PROPERTYKEY(PKEY_AppUserModel_ExcludeFromShowInNewInstall, 0x9f4c2855,0x9f79,0x4b39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,8); +DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9f4c2855,0x9f79,0x4B39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,5); +DEFINE_PROPERTYKEY(PKEY_AppUserModel_IsDestListSeparator, 0x9f4c2855,0x9f79,0x4b39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,6); +DEFINE_PROPERTYKEY(PKEY_AppUserModel_PreventPinning, 0x9f4c2855,0x9F79,0x4b39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,9); +DEFINE_PROPERTYKEY(PKEY_AppUserModel_RelaunchCommand, 0x9f4c2855,0x9f79,0x4b39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,2); +DEFINE_PROPERTYKEY(PKEY_AppUserModel_RelaunchDisplayNameResource, 0x9f4c2855,0x9f79,0x4b39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,4); +DEFINE_PROPERTYKEY(PKEY_AppUserModel_RelaunchIconResource, 0x9f4c2855,0x9f79,0x4b39,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,3); + +#endif /*_INC_PROPKEY*/