' ########################################################################################
' Microsoft Windows (Vista only; removed as of Windows 7)
' File: audiomediatype.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_audiomediatype_PBI)
#DEFINE PBX_audiomediatype_PBI
%EQUATE `AUDIOMEDIATYPE_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/System/MMReg.inc"
' // Size = 36 bytes
#IF NOT %DEF(%UNCOMPRESSEDAUDIOFORMAT)
%EQUATE `UNCOMPRESSEDAUDIOFORMAT = 1
TYPE UNCOMPRESSEDAUDIOFORMAT DWORD
 guidFormatType AS GUID ' GUID
 dwSamplesPerFrame AS DWORD
 dwBytesPerSampleContainer AS DWORD
 dwValidBitsPerSample AS DWORD
 fFramesPerSecond AS SINGLE ' FLOAT
 dwChannelMask AS DWORD
END TYPE
#ENDIF
' ########################################################################################
' Interface name = IAudioMediaType
' IID = 4E997F73-B71F-4798-873B-ED7DFCF15B4D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IAudioMediaType_INTERFACE_DEFINED)
 %IAudioMediaType_INTERFACE_DEFINED = 1
$IID_IAudioMediaType = GUID$("{4E997F73-B71F-4798-873B-ED7DFCF15B4D}")
INTERFACE IAudioMediaType $IID_IAudioMediaType
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IsCompressedFormat ( ' VTable offset = 12
 BYREF pfCompressed AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 16
 BYVAL pIAudioType AS IAudioMediaType
 , BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAudioFormat ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD GetUncompressedAudioFormat ( ' VTable offset = 24
 BYREF pUncompressedAudioFormat AS UNCOMPRESSEDAUDIOFORMAT
 ) AS DWORD ' const WAVEFORMATEX *
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAudioMediaType_INTERFACE_DEFINED__ */
'//
'// CreateAudioMediaType
'//
'STDAPI CreateAudioMediaType(
' const WAVEFORMATEX* pAudioFormat,
' UINT32 cbAudioFormatSize,
' IAudioMediaType** ppIAudioMediaType
' );
'//
'// CreateAudioMediaTypeFromUncompressedAudioFormat
'//
'STDAPI CreateAudioMediaTypeFromUncompressedAudioFormat(
' const UNCOMPRESSEDAUDIOFORMAT* pUncompressedAudioFormat,
' IAudioMediaType** ppIAudioMediaType
' );
%EQUATE `AUDIOMEDIATYPE_EQUAL_FORMAT_TYPES = &H00000002
%EQUATE `AUDIOMEDIATYPE_EQUAL_FORMAT_DATA = &H00000004
%EQUATE `AUDIOMEDIATYPE_EQUAL_FORMAT_USER_DATA = &H00000008
#ENDIF
