- fixed compile under MinGW64 compiler (gcc version 4.5.1 20100702)
 - cleaned portability typedefs, thanks to MinGW64 project added KS headers which also work well for MinGW32 (tested: gcc version 4.5.0)
wdmks:
 - made it possible to use additional WDM/KS info for WMME/DS back-ends by defining PAWIN_USE_WDMKS_DEVICE_INFO for compilation by MinGW32/64 compilers if you include modified headers located in '\src\hostapi\wasapi\mingw-include'
This commit is contained in:
dmitrykos 2010-08-24 17:44:00 +00:00
commit 52a9ce20ad
7 changed files with 9127 additions and 158 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,28 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#define INITGUID
#include <guiddef.h>
#ifndef DECLSPEC_SELECTANY
#define DECLSPEC_SELECTANY __declspec(selectany)
#endif
#ifdef DEFINE_GUIDEX
#undef DEFINE_GUIDEX
#endif
#ifdef __cplusplus
#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID DECLSPEC_SELECTANY name = { STATICGUIDOF(name) }
#else
#define DEFINE_GUIDEX(name) const CDECL GUID DECLSPEC_SELECTANY name = { STATICGUIDOF(name) }
#endif
#ifndef STATICGUIDOF
#define STATICGUIDOF(guid) STATIC_##guid
#endif
#ifndef DEFINE_WAVEFORMATEX_GUID
#define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x),0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,639 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef __KSPROXY__
#define __KSPROXY__
#ifdef __cplusplus
extern "C" {
#endif
#undef KSDDKAPI
#ifdef _KSDDK_
#define KSDDKAPI
#else
#define KSDDKAPI DECLSPEC_IMPORT
#endif
#define STATIC_IID_IKsObject \
0x423c13a2L,0x2070,0x11d0,0x9e,0xf7,0x00,0xaa,0x00,0xa2,0x16,0xa1
#define STATIC_IID_IKsPinEx \
0x7bb38260L,0xd19c,0x11d2,0xb3,0x8a,0x00,0xa0,0xc9,0x5e,0xc2,0x2e
#define STATIC_IID_IKsPin \
0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1
#define STATIC_IID_IKsPinPipe \
0xe539cd90L,0xa8b4,0x11d1,0x81,0x89,0x00,0xa0,0xc9,0x06,0x28,0x02
#define STATIC_IID_IKsDataTypeHandler \
0x5ffbaa02L,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1
#define STATIC_IID_IKsDataTypeCompletion \
0x827D1A0EL,0x0F73,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
#define STATIC_IID_IKsInterfaceHandler \
0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96
#define STATIC_IID_IKsClockPropertySet \
0x5C5CBD84L,0xE755,0x11D0,0xAC,0x18,0x00,0xA0,0xC9,0x22,0x31,0x96
#define STATIC_IID_IKsAllocator \
0x8da64899L,0xc0d9,0x11d0,0x84,0x13,0x00,0x00,0xf8,0x22,0xfe,0x8a
#define STATIC_IID_IKsAllocatorEx \
0x091bb63aL,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02
#ifndef STATIC_IID_IKsPropertySet
#define STATIC_IID_IKsPropertySet \
0x31EFAC30L,0x515C,0x11d0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93
#endif
#define STATIC_IID_IKsTopology \
0x28F54683L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
#ifndef STATIC_IID_IKsControl
#define STATIC_IID_IKsControl \
0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96
#endif
#define STATIC_IID_IKsAggregateControl \
0x7F40EAC0L,0x3947,0x11D2,0x87,0x4E,0x00,0xA0,0xC9,0x22,0x31,0x96
#define STATIC_CLSID_Proxy \
0x17CCA71BL,0xECD7,0x11D0,0xB9,0x08,0x00,0xA0,0xC9,0x22,0x31,0x96
#ifdef _KS_
DEFINE_GUIDEX(IID_IKsObject);
DEFINE_GUIDEX(IID_IKsPin);
DEFINE_GUIDEX(IID_IKsPinEx);
DEFINE_GUIDEX(IID_IKsPinPipe);
DEFINE_GUIDEX(IID_IKsDataTypeHandler);
DEFINE_GUIDEX(IID_IKsDataTypeCompletion);
DEFINE_GUIDEX(IID_IKsInterfaceHandler);
DEFINE_GUIDEX(IID_IKsClockPropertySet);
DEFINE_GUIDEX(IID_IKsAllocator);
DEFINE_GUIDEX(IID_IKsAllocatorEx);
#define IID_IKsQualityForwarder KSCATEGORY_QUALITY
#define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY
typedef enum {
KsAllocatorMode_User,
KsAllocatorMode_Kernel
} KSALLOCATORMODE;
typedef enum {
FramingProp_Uninitialized,
FramingProp_None,
FramingProp_Old,
FramingProp_Ex
} FRAMING_PROP;
typedef FRAMING_PROP *PFRAMING_PROP;
typedef enum {
Framing_Cache_Update,
Framing_Cache_ReadLast,
Framing_Cache_ReadOrig,
Framing_Cache_Write
} FRAMING_CACHE_OPS;
typedef struct {
LONGLONG MinTotalNominator;
LONGLONG MaxTotalNominator;
LONGLONG TotalDenominator;
} OPTIMAL_WEIGHT_TOTALS;
typedef struct IPin IPin;
typedef struct IKsPin IKsPin;
typedef struct IKsAllocator IKsAllocator;
typedef struct IKsAllocatorEx IKsAllocatorEx;
#define AllocatorStrategy_DontCare 0
#define AllocatorStrategy_MinimizeNumberOfFrames 0x00000001
#define AllocatorStrategy_MinimizeFrameSize 0x00000002
#define AllocatorStrategy_MinimizeNumberOfAllocators 0x00000004
#define AllocatorStrategy_MaximizeSpeed 0x00000008
#define PipeFactor_None 0
#define PipeFactor_UserModeUpstream 0x00000001
#define PipeFactor_UserModeDownstream 0x00000002
#define PipeFactor_MemoryTypes 0x00000004
#define PipeFactor_Flags 0x00000008
#define PipeFactor_PhysicalRanges 0x00000010
#define PipeFactor_OptimalRanges 0x00000020
#define PipeFactor_FixedCompression 0x00000040
#define PipeFactor_UnknownCompression 0x00000080
#define PipeFactor_Buffers 0x00000100
#define PipeFactor_Align 0x00000200
#define PipeFactor_PhysicalEnd 0x00000400
#define PipeFactor_LogicalEnd 0x00000800
typedef enum {
PipeState_DontCare,
PipeState_RangeNotFixed,
PipeState_RangeFixed,
PipeState_CompressionUnknown,
PipeState_Finalized
} PIPE_STATE;
typedef struct _PIPE_DIMENSIONS {
KS_COMPRESSION AllocatorPin;
KS_COMPRESSION MaxExpansionPin;
KS_COMPRESSION EndPin;
} PIPE_DIMENSIONS,*PPIPE_DIMENSIONS;
typedef enum {
Pipe_Allocator_None,
Pipe_Allocator_FirstPin,
Pipe_Allocator_LastPin,
Pipe_Allocator_MiddlePin
} PIPE_ALLOCATOR_PLACE;
typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;
typedef enum {
KS_MemoryTypeDontCare = 0,
KS_MemoryTypeKernelPaged,
KS_MemoryTypeKernelNonPaged,
KS_MemoryTypeDeviceHostMapped,
KS_MemoryTypeDeviceSpecific,
KS_MemoryTypeUser,
KS_MemoryTypeAnyHost
} KS_LogicalMemoryType;
typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
typedef struct _PIPE_TERMINATION {
ULONG Flags;
ULONG OutsideFactors;
ULONG Weigth;
KS_FRAMING_RANGE PhysicalRange;
KS_FRAMING_RANGE_WEIGHTED OptimalRange;
KS_COMPRESSION Compression;
} PIPE_TERMINATION;
typedef struct _ALLOCATOR_PROPERTIES_EX
{
long cBuffers;
long cbBuffer;
long cbAlign;
long cbPrefix;
GUID MemoryType;
GUID BusType;
PIPE_STATE State;
PIPE_TERMINATION Input;
PIPE_TERMINATION Output;
ULONG Strategy;
ULONG Flags;
ULONG Weight;
KS_LogicalMemoryType LogicalMemoryType;
PIPE_ALLOCATOR_PLACE AllocatorPlace;
PIPE_DIMENSIONS Dimensions;
KS_FRAMING_RANGE PhysicalRange;
IKsAllocatorEx *PrevSegment;
ULONG CountNextSegments;
IKsAllocatorEx **NextSegments;
ULONG InsideFactors;
ULONG NumberPins;
} ALLOCATOR_PROPERTIES_EX;
typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;
#ifdef __STREAMS__
struct IKsClockPropertySet;
#undef INTERFACE
#define INTERFACE IKsClockPropertySet
DECLARE_INTERFACE_(IKsClockPropertySet,IUnknown)
{
STDMETHOD(KsGetTime) (THIS_
LONGLONG *Time
) PURE;
STDMETHOD(KsSetTime) (THIS_
LONGLONG Time
) PURE;
STDMETHOD(KsGetPhysicalTime) (THIS_
LONGLONG *Time
) PURE;
STDMETHOD(KsSetPhysicalTime) (THIS_
LONGLONG Time
) PURE;
STDMETHOD(KsGetCorrelatedTime) (THIS_
KSCORRELATED_TIME *CorrelatedTime
) PURE;
STDMETHOD(KsSetCorrelatedTime) (THIS_
KSCORRELATED_TIME *CorrelatedTime
) PURE;
STDMETHOD(KsGetCorrelatedPhysicalTime)(THIS_
KSCORRELATED_TIME *CorrelatedTime
) PURE;
STDMETHOD(KsSetCorrelatedPhysicalTime)(THIS_
KSCORRELATED_TIME *CorrelatedTime
) PURE;
STDMETHOD(KsGetResolution) (THIS_
KSRESOLUTION *Resolution
) PURE;
STDMETHOD(KsGetState) (THIS_
KSSTATE *State
) PURE;
};
struct IKsAllocator;
#undef INTERFACE
#define INTERFACE IKsAllocator
DECLARE_INTERFACE_(IKsAllocator,IUnknown)
{
STDMETHOD_(HANDLE,KsGetAllocatorHandle)(THIS) PURE;
STDMETHOD_(KSALLOCATORMODE,KsGetAllocatorMode)(THIS) PURE;
STDMETHOD(KsGetAllocatorStatus) (THIS_
PKSSTREAMALLOCATOR_STATUS AllocatorStatus
) PURE;
STDMETHOD_(VOID,KsSetAllocatorMode) (THIS_
KSALLOCATORMODE Mode
) PURE;
};
struct IKsAllocatorEx;
#undef INTERFACE
#define INTERFACE IKsAllocatorEx
DECLARE_INTERFACE_(IKsAllocatorEx,IKsAllocator)
{
STDMETHOD_(PALLOCATOR_PROPERTIES_EX,KsGetProperties)(THIS) PURE;
STDMETHOD_(VOID,KsSetProperties) (THIS_
PALLOCATOR_PROPERTIES_EX
) PURE;
STDMETHOD_(VOID,KsSetAllocatorHandle) (THIS_
HANDLE AllocatorHandle
) PURE;
STDMETHOD_(HANDLE,KsCreateAllocatorAndGetHandle)(THIS_
IKsPin *KsPin
) PURE;
};
typedef enum {
KsPeekOperation_PeekOnly,
KsPeekOperation_AddRef
} KSPEEKOPERATION;
typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;
struct IKsPin;
#undef INTERFACE
#define INTERFACE IKsPin
DECLARE_INTERFACE_(IKsPin,IUnknown)
{
STDMETHOD(KsQueryMediums) (THIS_
PKSMULTIPLE_ITEM *MediumList
) PURE;
STDMETHOD(KsQueryInterfaces) (THIS_
PKSMULTIPLE_ITEM *InterfaceList
) PURE;
STDMETHOD(KsCreateSinkPinHandle) (THIS_
KSPIN_INTERFACE& Interface,
KSPIN_MEDIUM& Medium
) PURE;
STDMETHOD(KsGetCurrentCommunication) (THIS_
KSPIN_COMMUNICATION *Communication,
KSPIN_INTERFACE *Interface,
KSPIN_MEDIUM *Medium
) PURE;
STDMETHOD(KsPropagateAcquire) (THIS) PURE;
STDMETHOD(KsDeliver) (THIS_
IMediaSample *Sample,
ULONG Flags
) PURE;
STDMETHOD(KsMediaSamplesCompleted) (THIS_
PKSSTREAM_SEGMENT StreamSegment
) PURE;
STDMETHOD_(IMemAllocator *,KsPeekAllocator)(THIS_
KSPEEKOPERATION Operation
) PURE;
STDMETHOD(KsReceiveAllocator) (THIS_
IMemAllocator *MemAllocator
) PURE;
STDMETHOD(KsRenegotiateAllocator) (THIS) PURE;
STDMETHOD_(LONG,KsIncrementPendingIoCount)(THIS) PURE;
STDMETHOD_(LONG,KsDecrementPendingIoCount)(THIS) PURE;
STDMETHOD(KsQualityNotify) (THIS_
ULONG Proportion,
REFERENCE_TIME TimeDelta
) PURE;
};
struct IKsPinEx;
#undef INTERFACE
#define INTERFACE IKsPinEx
DECLARE_INTERFACE_(IKsPinEx,IKsPin)
{
STDMETHOD_(VOID,KsNotifyError) (THIS_
IMediaSample *Sample,
HRESULT hr
) PURE;
};
struct IKsPinPipe;
#undef INTERFACE
#define INTERFACE IKsPinPipe
DECLARE_INTERFACE_(IKsPinPipe,IUnknown)
{
STDMETHOD(KsGetPinFramingCache) (THIS_
PKSALLOCATOR_FRAMING_EX *FramingEx,
PFRAMING_PROP FramingProp,
FRAMING_CACHE_OPS Option
) PURE;
STDMETHOD(KsSetPinFramingCache) (THIS_
PKSALLOCATOR_FRAMING_EX FramingEx,
PFRAMING_PROP FramingProp,
FRAMING_CACHE_OPS Option
) PURE;
STDMETHOD_(IPin*,KsGetConnectedPin) (THIS) PURE;
STDMETHOD_(IKsAllocatorEx*,KsGetPipe) (THIS_
KSPEEKOPERATION Operation
) PURE;
STDMETHOD(KsSetPipe) (THIS_
IKsAllocatorEx *KsAllocator
) PURE;
STDMETHOD_(ULONG,KsGetPipeAllocatorFlag)(THIS) PURE;
STDMETHOD(KsSetPipeAllocatorFlag) (THIS_
ULONG Flag
) PURE;
STDMETHOD_(GUID,KsGetPinBusCache) (THIS) PURE;
STDMETHOD(KsSetPinBusCache) (THIS_
GUID Bus
) PURE;
STDMETHOD_(PWCHAR,KsGetPinName) (THIS) PURE;
STDMETHOD_(PWCHAR,KsGetFilterName) (THIS) PURE;
};
struct IKsPinFactory;
#undef INTERFACE
#define INTERFACE IKsPinFactory
DECLARE_INTERFACE_(IKsPinFactory,IUnknown)
{
STDMETHOD(KsPinFactory) (THIS_
ULONG *PinFactory
) PURE;
};
typedef enum {
KsIoOperation_Write,
KsIoOperation_Read
} KSIOOPERATION;
struct IKsDataTypeHandler;
#undef INTERFACE
#define INTERFACE IKsDataTypeHandler
DECLARE_INTERFACE_(IKsDataTypeHandler,IUnknown)
{
STDMETHOD(KsCompleteIoOperation) (THIS_
IMediaSample *Sample,
PVOID StreamHeader,
KSIOOPERATION IoOperation,
WINBOOL Cancelled
) PURE;
STDMETHOD(KsIsMediaTypeInRanges) (THIS_
PVOID DataRanges
) PURE;
STDMETHOD(KsPrepareIoOperation) (THIS_
IMediaSample *Sample,
PVOID StreamHeader,
KSIOOPERATION IoOperation
) PURE;
STDMETHOD(KsQueryExtendedSize) (THIS_
ULONG *ExtendedSize
) PURE;
STDMETHOD(KsSetMediaType) (THIS_
const AM_MEDIA_TYPE *AmMediaType
) PURE;
};
struct IKsDataTypeCompletion;
#undef INTERFACE
#define INTERFACE IKsDataTypeCompletion
DECLARE_INTERFACE_(IKsDataTypeCompletion,IUnknown)
{
STDMETHOD(KsCompleteMediaType) (THIS_
HANDLE FilterHandle,
ULONG PinFactoryId,
AM_MEDIA_TYPE *AmMediaType
) PURE;
};
struct IKsInterfaceHandler;
#undef INTERFACE
#define INTERFACE IKsInterfaceHandler
DECLARE_INTERFACE_(IKsInterfaceHandler,IUnknown)
{
STDMETHOD(KsSetPin) (THIS_
IKsPin *KsPin
) PURE;
STDMETHOD(KsProcessMediaSamples) (THIS_
IKsDataTypeHandler *KsDataTypeHandler,
IMediaSample **SampleList,
PLONG SampleCount,
KSIOOPERATION IoOperation,
PKSSTREAM_SEGMENT *StreamSegment
) PURE;
STDMETHOD(KsCompleteIo) (THIS_
PKSSTREAM_SEGMENT StreamSegment
) PURE;
};
typedef struct _KSSTREAM_SEGMENT {
IKsInterfaceHandler *KsInterfaceHandler;
IKsDataTypeHandler *KsDataTypeHandler;
KSIOOPERATION IoOperation;
HANDLE CompletionEvent;
} KSSTREAM_SEGMENT;
struct IKsObject;
#undef INTERFACE
#define INTERFACE IKsObject
DECLARE_INTERFACE_(IKsObject,IUnknown)
{
STDMETHOD_(HANDLE,KsGetObjectHandle) (THIS) PURE;
};
struct IKsQualityForwarder;
#undef INTERFACE
#define INTERFACE IKsQualityForwarder
DECLARE_INTERFACE_(IKsQualityForwarder,IKsObject)
{
STDMETHOD_(VOID,KsFlushClient) (THIS_
IKsPin *Pin
) PURE;
};
struct IKsNotifyEvent;
#undef INTERFACE
#define INTERFACE IKsNotifyEvent
DECLARE_INTERFACE_(IKsNotifyEvent,IUnknown)
{
STDMETHOD(KsNotifyEvent) (THIS_
ULONG Event,
ULONG_PTR lParam1,
ULONG_PTR lParam2
) PURE;
};
KSDDKAPI HRESULT WINAPI KsResolveRequiredAttributes(PKSDATARANGE DataRange,PKSMULTIPLE_ITEM Attributes);
KSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category,ACCESS_MASK Access,PHANDLE DeviceHandle);
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle,ULONG IoControl,PVOID InBuffer,ULONG InLength,PVOID OutBuffer,ULONG OutLength,PULONG BytesReturned);
KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle,ULONG PinFactoryId,ULONG PropertyId,PVOID *Items);
KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle,ULONG PinFactoryId,ULONG *MediaTypeCount);
KSDDKAPI HRESULT WINAPI KsGetMediaType(int Position,AM_MEDIA_TYPE *AmMediaType,HANDLE FilterHandle,ULONG PinFactoryId);
#endif /* __STREAMS__ */
#ifndef _IKsPropertySet_
DEFINE_GUIDEX(IID_IKsPropertySet);
#endif
#ifndef _IKsControl_
DEFINE_GUIDEX(IID_IKsControl);
#endif
DEFINE_GUIDEX(IID_IKsAggregateControl);
#ifndef _IKsTopology_
DEFINE_GUIDEX(IID_IKsTopology);
#endif
DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196",CLSID_Proxy);
#define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)
#else /* _KS_ */
#ifndef _IKsPropertySet_
DEFINE_GUID(IID_IKsPropertySet,STATIC_IID_IKsPropertySet);
#endif
DEFINE_GUID(CLSID_Proxy,STATIC_CLSID_Proxy);
#endif /* _KS_ */
#ifndef _IKsPropertySet_
#define _IKsPropertySet_
#define KSPROPERTY_SUPPORT_GET 1
#define KSPROPERTY_SUPPORT_SET 2
#ifdef DECLARE_INTERFACE_
struct IKsPropertySet;
#undef INTERFACE
#define INTERFACE IKsPropertySet
DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
{
STDMETHOD(Set) (THIS_
REFGUID PropSet,
ULONG Id,
LPVOID InstanceData,
ULONG InstanceLength,
LPVOID PropertyData,
ULONG DataLength
) PURE;
STDMETHOD(Get) (THIS_
REFGUID PropSet,
ULONG Id,
LPVOID InstanceData,
ULONG InstanceLength,
LPVOID PropertyData,
ULONG DataLength,
ULONG *BytesReturned
) PURE;
STDMETHOD(QuerySupported) (THIS_
REFGUID PropSet,
ULONG Id,
ULONG *TypeSupport
) PURE;
};
#endif /* DECLARE_INTERFACE_ */
#endif /* _IKsPropertySet_ */
#ifndef _IKsControl_
#define _IKsControl_
#ifdef DECLARE_INTERFACE_
struct IKsControl;
#undef INTERFACE
#define INTERFACE IKsControl
DECLARE_INTERFACE_(IKsControl,IUnknown)
{
STDMETHOD(KsProperty) (THIS_
PKSPROPERTY Property,
ULONG PropertyLength,
LPVOID PropertyData,
ULONG DataLength,
ULONG *BytesReturned
) PURE;
STDMETHOD(KsMethod) (THIS_
PKSMETHOD Method,
ULONG MethodLength,
LPVOID MethodData,
ULONG DataLength,
ULONG *BytesReturned
) PURE;
STDMETHOD(KsEvent) (THIS_
PKSEVENT Event,
ULONG EventLength,
LPVOID EventData,
ULONG DataLength,
ULONG *BytesReturned
) PURE;
};
#endif /* DECLARE_INTERFACE_ */
#endif /* _IKsControl_ */
#ifdef DECLARE_INTERFACE_
struct IKsAggregateControl;
#undef INTERFACE
#define INTERFACE IKsAggregateControl
DECLARE_INTERFACE_(IKsAggregateControl,IUnknown)
{
STDMETHOD(KsAddAggregate) (THIS_
REFGUID AggregateClass
) PURE;
STDMETHOD(KsRemoveAggregate) (THIS_
REFGUID AggregateClass
) PURE;
};
#endif /* DECLARE_INTERFACE_ */
#ifndef _IKsTopology_
#define _IKsTopology_
#ifdef DECLARE_INTERFACE_
struct IKsTopology;
#undef INTERFACE
#define INTERFACE IKsTopology
DECLARE_INTERFACE_(IKsTopology,IUnknown)
{
STDMETHOD(CreateNodeInstance) (THIS_
ULONG NodeId,
ULONG Flags,
ACCESS_MASK DesiredAccess,
IUnknown *UnkOuter,
REFGUID InterfaceId,
LPVOID *Interface
) PURE;
};
#endif /* DECLARE_INTERFACE_ */
#endif /* _IKsTopology_ */
#ifdef __cplusplus
}
#endif
#endif /* __KSPROXY__ */

View file

@ -0,0 +1,159 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PACK,
0x36523B13,0x8EE5,0x11d1,0x8C,0xA3,0x00,0x60,0xB0,0x57,0x66,0x4A)
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PES,
0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_SECTIONS,
0x455f176c,0x4b06,0x47ce,0x9a,0xef,0x8c,0xae,0xf7,0x3d,0xf7,0xb5)
OUR_GUID_ENTRY(MEDIASUBTYPE_ATSC_SI,
0xb3c7397c,0xd303,0x414d,0xb3,0x3c,0x4e,0xd2,0xc9,0xd2,0x97,0x33)
OUR_GUID_ENTRY(MEDIASUBTYPE_DVB_SI,
0xe9dd31a3,0x221d,0x4adb,0x85,0x32,0x9a,0xf3,0x9,0xc1,0xa4,0x8)
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2DATA,
0xc892e55b,0x252d,0x42b5,0xa3,0x16,0xd9,0x97,0xe7,0xa5,0xd9,0x95)
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VIDEO,
0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(FORMAT_MPEG2_VIDEO,
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(FORMAT_VIDEOINFO2,
0xf72a76A0L,0xeb0a,0x11d0,0xac,0xe4,0x0,0x0,0xc0,0xcc,0x16,0xba)
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PROGRAM,
0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT,
0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE,
0x138aa9a4,0x1ee2,0x4c5b,0x98,0x8e,0x19,0xab,0xfd,0xbc,0x8a,0x11)
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_AUDIO,
0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3,
0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_SUBPICTURE,
0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_LPCM_AUDIO,
0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DTS,
0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_SDDS,
0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIATYPE_DVD_ENCRYPTED_PACK,
0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x04f,0xc3,0x1d,0x60)
OUR_GUID_ENTRY(MEDIATYPE_DVD_NAVIGATION,
0xe06d802e,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PCI,
0xe06d802f,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_DSI,
0xe06d8030,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER,
0xe06d8031,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(FORMAT_MPEG2Video,
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(FORMAT_DolbyAC3,
0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(FORMAT_MPEG2Audio,
0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(FORMAT_DVD_LPCMAudio,
0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
OUR_GUID_ENTRY(AM_KSPROPSETID_AC3,
0xBFABE720,0x6E1F,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00)
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdSubPic,
0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9)
OUR_GUID_ENTRY(AM_KSPROPSETID_CopyProt,
0x0E8A0A40,0x6AEF,0x11D0,0x9E,0xD0,0x00,0xA0,0x24,0xCA,0x19,0xB3)
OUR_GUID_ENTRY(AM_KSPROPSETID_TSRateChange,
0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0)
OUR_GUID_ENTRY(AM_KSPROPSETID_DVD_RateChange,
0x3577eb09,0x9582,0x477f,0xb2,0x9c,0xb0,0xc4,0x52,0xa4,0xff,0x9a)
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdKaraoke,
0xae4720ae,0xaa71,0x42d8,0xb8,0x2a,0xff,0xfd,0xf5,0x8b,0x76,0xfd)
OUR_GUID_ENTRY(AM_KSPROPSETID_FrameStep,
0xc830acbd,0xab07,0x492f,0x88,0x52,0x45,0xb6,0x98,0x7c,0x29,0x79)
OUR_GUID_ENTRY(AM_KSCATEGORY_CAPTURE,
0x65E8773DL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(AM_KSCATEGORY_RENDER,
0x65E8773EL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(AM_KSCATEGORY_DATACOMPRESSOR,
0x1E84C900L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
OUR_GUID_ENTRY(AM_KSCATEGORY_AUDIO,
0x6994AD04L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(AM_KSCATEGORY_VIDEO,
0x6994AD05L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(AM_KSCATEGORY_TVTUNER,
0xa799a800L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
OUR_GUID_ENTRY(AM_KSCATEGORY_CROSSBAR,
0xa799a801L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
OUR_GUID_ENTRY(AM_KSCATEGORY_TVAUDIO,
0xa799a802L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC,
0x07dad660L,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f)
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC_MI,
0x9c24a977,0x951,0x451a,0x80,0x6,0xe,0x49,0xbd,0x28,0xcd,0x5f)
OUR_GUID_ENTRY(AM_KSCATEGORY_SPLITTER,
0x0A4252A0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
OUR_GUID_ENTRY(IID_IKsInterfaceHandler,
0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(IID_IKsDataTypeHandler,
0x5FFBAA02L,0x49A3,0x11D0,0x9F,0x36,0x00,0xAA,0x00,0xA2,0x16,0xA1)
OUR_GUID_ENTRY(IID_IKsPin,
0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1)
OUR_GUID_ENTRY(IID_IKsControl,
0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(IID_IKsPinFactory,
0xCD5EBE6BL,0x8B6E,0x11D1,0x8A,0xE0,0x00,0xA0,0xC9,0x22,0x31,0x96)
OUR_GUID_ENTRY(AM_INTERFACESETID_Standard,
0x1A8766A0L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)

View file

@ -74,17 +74,20 @@
#include "pa_win_wasapi.h"
#ifndef NTDDI_VERSION
#define NTDDI_VERSION 0x06000000 // NTDDI_VISTA
#undef WINVER
#undef _WIN32_WINNT
#define WINVER 0x0600 // VISTA
#define _WIN32_WINNT WINVER
#ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY
typedef enum _AVRT_PRIORITY
{
AVRT_PRIORITY_LOW = -1,
AVRT_PRIORITY_NORMAL,
AVRT_PRIORITY_HIGH,
AVRT_PRIORITY_CRITICAL
} AVRT_PRIORITY, *PAVRT_PRIORITY;
typedef enum _AVRT_PRIORITY
{
AVRT_PRIORITY_LOW = -1,
AVRT_PRIORITY_NORMAL,
AVRT_PRIORITY_HIGH,
AVRT_PRIORITY_CRITICAL
} AVRT_PRIORITY, *PAVRT_PRIORITY;
#endif
#include <basetyps.h> // << for IID/CLSID
@ -111,121 +114,9 @@
#define __MIDL_CONST const
#endif
#ifndef WAVE_FORMAT_IEEE_FLOAT
#define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point
#endif
// Speaker Positions:
#define SPEAKER_FRONT_LEFT 0x1
#define SPEAKER_FRONT_RIGHT 0x2
#define SPEAKER_FRONT_CENTER 0x4
#define SPEAKER_LOW_FREQUENCY 0x8
#define SPEAKER_BACK_LEFT 0x10
#define SPEAKER_BACK_RIGHT 0x20
#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
#define SPEAKER_BACK_CENTER 0x100
#define SPEAKER_SIDE_LEFT 0x200
#define SPEAKER_SIDE_RIGHT 0x400
#define SPEAKER_TOP_CENTER 0x800
#define SPEAKER_TOP_FRONT_LEFT 0x1000
#define SPEAKER_TOP_FRONT_CENTER 0x2000
#define SPEAKER_TOP_FRONT_RIGHT 0x4000
#define SPEAKER_TOP_BACK_LEFT 0x8000
#define SPEAKER_TOP_BACK_CENTER 0x10000
#define SPEAKER_TOP_BACK_RIGHT 0x20000
// Bit mask locations reserved for future use
#define SPEAKER_RESERVED 0x7FFC0000
// Used to specify that any possible permutation of speaker configurations
#define SPEAKER_ALL 0x80000000
// DirectSound Speaker Config
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define KSAUDIO_SPEAKER_DIRECTOUT 0
#endif
#define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER)
#define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
#define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
#define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
#define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
#define 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)
#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
#define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
#define 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).
#define KSAUDIO_SPEAKER_5POINT1_BACK KSAUDIO_SPEAKER_5POINT1
#define KSAUDIO_SPEAKER_7POINT1_WIDE KSAUDIO_SPEAKER_7POINT1
#endif // XP SP2 and later (chronologically)
// DVD Speaker Positions
#define KSAUDIO_SPEAKER_GROUND_FRONT_LEFT SPEAKER_FRONT_LEFT
#define KSAUDIO_SPEAKER_GROUND_FRONT_CENTER SPEAKER_FRONT_CENTER
#define KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT SPEAKER_FRONT_RIGHT
#define KSAUDIO_SPEAKER_GROUND_REAR_LEFT SPEAKER_BACK_LEFT
#define KSAUDIO_SPEAKER_GROUND_REAR_RIGHT SPEAKER_BACK_RIGHT
#define KSAUDIO_SPEAKER_TOP_MIDDLE SPEAKER_TOP_CENTER
#define KSAUDIO_SPEAKER_SUPER_WOOFER SPEAKER_LOW_FREQUENCY
#ifdef WIN64
#include <wtypes.h>
typedef LONG NTSTATUS;
typedef void *PKSEVENT_ENTRY;
typedef void *PKSDEVICE;
typedef void *PKSFILTERFACTORY;
typedef void *PKSFILTER;
typedef void *PIRP;
typedef void *PCM_RESOURCE_LIST;
typedef void *PDEVICE_CAPABILITIES;
typedef void *PKSPIN;
typedef void *PKSPROCESSPIN_INDEXENTRY;
typedef void KSATTRIBUTE_LIST;
typedef void *PKSHANDSHAKE;
typedef void *PKTIMER;
typedef void *PKDPC;
typedef void *PKSSTREAM_POINTER;
typedef void KSPROPERTY_SET;
typedef void KSCLOCK_DISPATCH;
typedef void KSMETHOD_SET;
typedef void KSEVENT_SET;
typedef void KSALLOCATOR_DISPATCH;
typedef void KSDEVICE_DISPATCH;
typedef void KSFILTER_DISPATCH;
typedef void KSFILTER_DESCRIPTOR;
typedef void KSPIN_DESCRIPTOR_EX;
typedef void KSPIN_DISPATCH;
typedef void KSDEVICE_DESCRIPTOR;
typedef void *PFNKSDELETEALLOCATOR;
typedef void *PFNKSDEFAULTALLOCATE;
typedef void *PFNKSDEFAULTFREE;
typedef void KSNODE_DESCRIPTOR;
typedef char KSPIN_DESCRIPTOR;
typedef void *PFNKSINTERSECTHANDLEREX;
typedef void *PDEVICE_OBJECT;
typedef void *PHYSICAL_ADDRESS;
typedef void *PKSSTREAM_POINTER_OFFSET;
typedef void *PKSPROCESSPIN;
typedef void *PMDL;
typedef ULONG KSSTREAM_POINTER_OFFSET;
typedef void KSJACK_DESCRIPTION;
#define FASTCALL
#include <oleidl.h>
#include <objidl.h>
@ -239,16 +130,23 @@
typedef LONGLONG REFERENCE_TIME;
#define NONAMELESSUNION
#endif
#ifndef WAVE_FORMAT_IEEE_FLOAT
#define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point
#endif
#ifndef __MINGW_EXTENSION
#if defined(__GNUC__) || defined(__GNUG__)
#define __MINGW_EXTENSION __extension__
#else
#define __MINGW_EXTENSION
#endif
#endif
#undef NTDDI_VERSION
#undef WINVER
#define WINVER 0x0600
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#include <sdkddkver.h>
#include <propkeydef.h>
#define COBJMACROS
#define INITGUID
#define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
#include <audioclient.h>
#include <mmdeviceapi.h>
#include <endpointvolume.h>
@ -4015,14 +3913,22 @@ PA_THREAD_FUNC ProcThreadEvent(void *param)
case WAIT_OBJECT_0 + S_INPUT: {
if (stream->cclient == NULL)
break;
ProcessInputBuffer(stream, processor);
if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
{
LogHostError(hr);
goto thread_error;
}
break; }
// Output stream
case WAIT_OBJECT_0 + S_OUTPUT: {
if (stream->rclient == NULL)
break;
ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer);
if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
{
LogHostError(hr);
goto thread_error;
}
break; }
}
}
@ -4198,7 +4104,11 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
case S_INPUT: {
if (stream->cclient == NULL)
break;
ProcessInputBuffer(stream, processor);
if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
{
LogHostError(hr);
goto thread_error;
}
break; }
// Output stream
@ -4212,19 +4122,31 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
if ((hr = PollGetOutputFramesAvailable(stream, &frames)) != S_OK)
{
LogHostError(hr);
break;
goto thread_error;
}
// output
if (stream->bufferMode == paUtilFixedHostBufferSize)
{
if (frames >= stream->out.framesPerBuffer)
ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer);
{
if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
{
LogHostError(hr);
goto thread_error;
}
}
}
else
{
if (frames != 0)
ProcessOutputBuffer(stream, processor, frames);
{
if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
{
LogHostError(hr);
goto thread_error;
}
}
}
break; }

View file

@ -37,39 +37,43 @@
#include <windows.h>
#include <mmreg.h>
#ifndef WAVE_FORMAT_IEEE_FLOAT
#define WAVE_FORMAT_IEEE_FLOAT 0x0003 // MinGW32 does not define this
#endif
#ifndef _WAVEFORMATEXTENSIBLE_
#define _WAVEFORMATEXTENSIBLE_ // MinGW32 does not define this
#endif
#ifndef _INC_MMREG
#define _INC_MMREG // for STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
#endif
#include <winioctl.h> // MinGW32 does not define this automatically
#include <ks.h>
#include <ksmedia.h>
#include <stdio.h> // just for some development printfs
#include <stdio.h> // just for some development printfs
#include "portaudio.h"
#include "pa_util.h"
#include "pa_win_wdmks_utils.h"
#ifndef PA_WDMKS_NO_KSGUID_LIB
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
#pragma comment( lib, "ksguid.lib" )
#endif
#define pa_KSDATAFORMAT_TYPE_AUDIO KSDATAFORMAT_TYPE_AUDIO
#define pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
#define pa_KSDATAFORMAT_SUBTYPE_PCM KSDATAFORMAT_SUBTYPE_PCM
#define pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
#define pa_KSMEDIUMSETID_Standard KSMEDIUMSETID_Standard
#define pa_KSINTERFACESETID_Standard KSINTERFACESETID_Standard
#define pa_KSPROPSETID_Pin KSPROPSETID_Pin
#if !defined(PA_WDMKS_NO_KSGUID_LIB) && !defined(PAWIN_WDMKS_NO_KSGUID_LIB)
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
#pragma comment( lib, "ksguid.lib" )
#endif
#define pa_KSDATAFORMAT_TYPE_AUDIO KSDATAFORMAT_TYPE_AUDIO
#define pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
#define pa_KSDATAFORMAT_SUBTYPE_PCM KSDATAFORMAT_SUBTYPE_PCM
#define pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
#define pa_KSMEDIUMSETID_Standard KSMEDIUMSETID_Standard
#define pa_KSINTERFACESETID_Standard KSINTERFACESETID_Standard
#define pa_KSPROPSETID_Pin KSPROPSETID_Pin
#else
static const GUID pa_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
static const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };
static const GUID pa_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
static const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };
static const GUID pa_KSMEDIUMSETID_Standard = { STATIC_KSMEDIUMSETID_Standard };
static const GUID pa_KSINTERFACESETID_Standard = { STATIC_KSINTERFACESETID_Standard };
static const GUID pa_KSPROPSETID_Pin = { STATIC_KSPROPSETID_Pin };
static const GUID pa_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
static const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };
static const GUID pa_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
static const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };
static const GUID pa_KSMEDIUMSETID_Standard = { STATIC_KSMEDIUMSETID_Standard };
static const GUID pa_KSINTERFACESETID_Standard = { STATIC_KSINTERFACESETID_Standard };
static const GUID pa_KSPROPSETID_Pin = { STATIC_KSPROPSETID_Pin };
#endif