1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms 6 //! this ALWAYS GENERATED file contains the definitions for the interfaces 7 use ctypes::c_float; 8 use shared::basetsd::{UINT32, UINT64}; 9 use shared::guiddef::{LPCGUID, REFIID}; 10 use shared::minwindef::{BYTE, DWORD, LPVOID}; 11 use shared::mmreg::WAVEFORMATEX; 12 use shared::winerror::{FACILITY_AUDCLNT, SEVERITY_ERROR, SEVERITY_SUCCESS}; 13 use shared::wtypesbase::SCODE; 14 use um::audiosessiontypes::AUDCLNT_SHAREMODE; 15 use um::strmif::REFERENCE_TIME; 16 use um::unknwnbase::{IUnknown, IUnknownVtbl}; 17 use um::winnt::{HANDLE, HRESULT}; 18 //1627 19 pub const AUDCLNT_E_NOT_INITIALIZED: HRESULT = AUDCLNT_ERR!(0x001); 20 pub const AUDCLNT_E_ALREADY_INITIALIZED: HRESULT = AUDCLNT_ERR!(0x002); 21 pub const AUDCLNT_E_WRONG_ENDPOINT_TYPE: HRESULT = AUDCLNT_ERR!(0x003); 22 pub const AUDCLNT_E_DEVICE_INVALIDATED: HRESULT = AUDCLNT_ERR!(0x004); 23 pub const AUDCLNT_E_NOT_STOPPED: HRESULT = AUDCLNT_ERR!(0x005); 24 pub const AUDCLNT_E_BUFFER_TOO_LARGE: HRESULT = AUDCLNT_ERR!(0x006); 25 pub const AUDCLNT_E_OUT_OF_ORDER: HRESULT = AUDCLNT_ERR!(0x007); 26 pub const AUDCLNT_E_UNSUPPORTED_FORMAT: HRESULT = AUDCLNT_ERR!(0x008); 27 pub const AUDCLNT_E_INVALID_SIZE: HRESULT = AUDCLNT_ERR!(0x009); 28 pub const AUDCLNT_E_DEVICE_IN_USE: HRESULT = AUDCLNT_ERR!(0x00a); 29 pub const AUDCLNT_E_BUFFER_OPERATION_PENDING: HRESULT = AUDCLNT_ERR!(0x00b); 30 pub const AUDCLNT_E_THREAD_NOT_REGISTERED: HRESULT = AUDCLNT_ERR!(0x00c); 31 pub const AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED: HRESULT = AUDCLNT_ERR!(0x00e); 32 pub const AUDCLNT_E_ENDPOINT_CREATE_FAILED: HRESULT = AUDCLNT_ERR!(0x00f); 33 pub const AUDCLNT_E_SERVICE_NOT_RUNNING: HRESULT = AUDCLNT_ERR!(0x010); 34 pub const AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED: HRESULT = AUDCLNT_ERR!(0x011); 35 pub const AUDCLNT_E_EXCLUSIVE_MODE_ONLY: HRESULT = AUDCLNT_ERR!(0x012); 36 pub const AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL: HRESULT = AUDCLNT_ERR!(0x013); 37 pub const AUDCLNT_E_EVENTHANDLE_NOT_SET: HRESULT = AUDCLNT_ERR!(0x014); 38 pub const AUDCLNT_E_INCORRECT_BUFFER_SIZE: HRESULT = AUDCLNT_ERR!(0x015); 39 pub const AUDCLNT_E_BUFFER_SIZE_ERROR: HRESULT = AUDCLNT_ERR!(0x016); 40 pub const AUDCLNT_E_CPUUSAGE_EXCEEDED: HRESULT = AUDCLNT_ERR!(0x017); 41 pub const AUDCLNT_E_BUFFER_ERROR: HRESULT = AUDCLNT_ERR!(0x018); 42 pub const AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED: HRESULT = AUDCLNT_ERR!(0x019); 43 pub const AUDCLNT_E_INVALID_DEVICE_PERIOD: HRESULT = AUDCLNT_ERR!(0x020); 44 pub const AUDCLNT_E_INVALID_STREAM_FLAG: HRESULT = AUDCLNT_ERR!(0x021); 45 pub const AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE: HRESULT = AUDCLNT_ERR!(0x022); 46 pub const AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES: HRESULT = AUDCLNT_ERR!(0x023); 47 pub const AUDCLNT_E_OFFLOAD_MODE_ONLY: HRESULT = AUDCLNT_ERR!(0x024); 48 pub const AUDCLNT_E_NONOFFLOAD_MODE_ONLY: HRESULT = AUDCLNT_ERR!(0x025); 49 pub const AUDCLNT_E_RESOURCES_INVALIDATED: HRESULT = AUDCLNT_ERR!(0x026); 50 pub const AUDCLNT_E_RAW_MODE_UNSUPPORTED: HRESULT = AUDCLNT_ERR!(0x027); 51 pub const AUDCLNT_S_BUFFER_EMPTY: SCODE = AUDCLNT_SUCCESS!(0x001); 52 pub const AUDCLNT_S_THREAD_ALREADY_REGISTERED: SCODE = AUDCLNT_SUCCESS!(0x002); 53 pub const AUDCLNT_S_POSITION_STALLED: SCODE = AUDCLNT_SUCCESS!(0x003); 54 ENUM!{enum AUDCLNT_BUFFERFLAGS { 55 AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY = 0x1, 56 AUDCLNT_BUFFERFLAGS_SILENT = 0x2, 57 AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR = 0x4, 58 }} 59 DEFINE_GUID!{IID_IAudioClient, 60 0x1CB9AD4C, 0xDBFA, 0x4c32, 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2} 61 DEFINE_GUID!{IID_IAudioRenderClient, 62 0xF294ACFC, 0x3146, 0x4483, 0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2} 63 DEFINE_GUID!{IID_IAudioCaptureClient, 64 0xc8adbd64, 0xe71e, 0x48a0, 0xa4, 0xde, 0x18, 0x5c, 0x39, 0x5c, 0xd3, 0x17} 65 DEFINE_GUID!{IID_IAudioClock, 66 0xcd63314f, 0x3fba, 0x4a1b, 0x81, 0x2c, 0xef, 0x96, 0x35, 0x87, 0x28, 0xe7} 67 DEFINE_GUID!{IID_IAudioStreamVolume, 68 0x93014887, 0x242d, 0x4068, 0x8a, 0x15, 0xcf, 0x5e, 0x93, 0xb9, 0x0f, 0xe3} 69 RIDL!{#[uuid(0x1cb9ad4c, 0xdbfa, 0x4c32, 0xb1, 0x78, 0xc2, 0xf5, 0x68, 0xa7, 0x03, 0xb2)] 70 interface IAudioClient(IAudioClientVtbl): IUnknown(IUnknownVtbl) { 71 fn Initialize( 72 ShareMode: AUDCLNT_SHAREMODE, 73 StreamFlags: DWORD, 74 hnsBufferDuration: REFERENCE_TIME, 75 hnsPeriodicity: REFERENCE_TIME, 76 pFormat: *const WAVEFORMATEX, 77 AudioSessionGuid: LPCGUID, 78 ) -> HRESULT, 79 fn GetBufferSize( 80 pNumBufferFrames: *mut UINT32, 81 ) -> HRESULT, 82 fn GetStreamLatency( 83 phnsLatency: *mut REFERENCE_TIME, 84 ) -> HRESULT, 85 fn GetCurrentPadding( 86 pNumPaddingFrames: *mut UINT32, 87 ) -> HRESULT, 88 fn IsFormatSupported( 89 ShareMode: AUDCLNT_SHAREMODE, 90 pFormat: *const WAVEFORMATEX, 91 ppClosestMatch: *mut *mut WAVEFORMATEX, 92 ) -> HRESULT, 93 fn GetMixFormat( 94 ppDeviceFormat: *mut *mut WAVEFORMATEX, 95 ) -> HRESULT, 96 fn GetDevicePeriod( 97 phnsDefaultDevicePeriod: *mut REFERENCE_TIME, 98 phnsMinimumDevicePeriod: *mut REFERENCE_TIME, 99 ) -> HRESULT, 100 fn Start() -> HRESULT, 101 fn Stop() -> HRESULT, 102 fn Reset() -> HRESULT, 103 fn SetEventHandle( 104 eventHandle: HANDLE, 105 ) -> HRESULT, 106 fn GetService( 107 riid: REFIID, 108 ppv: *mut LPVOID, 109 ) -> HRESULT, 110 }} 111 RIDL!{#[uuid(0xf294acfc, 0x3146, 0x4483, 0xa7, 0xbf, 0xad, 0xdc, 0xa7, 0xc2, 0x60, 0xe2)] 112 interface IAudioRenderClient(IAudioRenderClientVtbl): IUnknown(IUnknownVtbl) { 113 fn GetBuffer( 114 NumFramesRequested: UINT32, 115 ppData: *mut *mut BYTE, 116 ) -> HRESULT, 117 fn ReleaseBuffer( 118 NumFramesWritten: UINT32, 119 dwFlags: DWORD, 120 ) -> HRESULT, 121 }} 122 RIDL!{#[uuid(0xc8adbd64, 0xe71e, 0x48a0, 0xa4, 0xde, 0x18, 0x5c, 0x39, 0x5c, 0xd3, 0x17)] 123 interface IAudioCaptureClient(IAudioCaptureClientVtbl): IUnknown(IUnknownVtbl) { 124 fn GetBuffer( 125 ppData: *mut *mut BYTE, 126 pNumFramesToRead: *mut UINT32, 127 pdwFlags: *mut DWORD, 128 pu64DevicePosition: *mut UINT64, 129 pu64QPCPosition: *mut UINT64, 130 ) -> HRESULT, 131 fn ReleaseBuffer( 132 NumFramesRead: UINT32, 133 ) -> HRESULT, 134 fn GetNextPacketSize( 135 pNumFramesInNextPacket: *mut UINT32, 136 ) -> HRESULT, 137 }} 138 RIDL!{#[uuid(0xcd63314f, 0x3fba, 0x4a1b, 0x81, 0x2c, 0xef, 0x96, 0x35, 0x87, 0x28, 0xe7)] 139 interface IAudioClock(IAudioClockVtbl): IUnknown(IUnknownVtbl) { 140 fn GetFrequency( 141 pu64Frequency: *mut UINT64, 142 ) -> HRESULT, 143 fn GetPosition( 144 pu64Position: *mut UINT64, 145 pu64QPCPosition: *mut UINT64, 146 ) -> HRESULT, 147 fn GetCharacteristics( 148 pdwCharacteristics: *mut DWORD, 149 ) -> HRESULT, 150 }} 151 RIDL!{#[uuid(0x93014887, 0x242d, 0x4068, 0x8a, 0x15, 0xcf, 0x5e, 0x93, 0xb9, 0x0f, 0xe3)] 152 interface IAudioStreamVolume(IAudioStreamVolumeVtbl): IUnknown(IUnknownVtbl) { 153 fn GetChannelCount( 154 pdwCount: *mut UINT32, 155 ) -> HRESULT, 156 fn SetChannelVolume( 157 dwIndex: UINT32, 158 fLevel: c_float, 159 ) -> HRESULT, 160 fn GetChannelVolume( 161 dwIndex: UINT32, 162 pfLevel: *mut c_float, 163 ) -> HRESULT, 164 fn SetAllVolumes( 165 dwCount: UINT32, 166 pfVolumes: *const c_float, 167 ) -> HRESULT, 168 fn GetAllVolumes( 169 dwCount: UINT32, 170 pfVolumes: *mut c_float, 171 ) -> HRESULT, 172 }} 173