1 /*** Autogenerated by WIDL 1.6 from include/audioclient.idl - Do not edit ***/ 2 3 #ifndef __REQUIRED_RPCNDR_H_VERSION__ 4 #define __REQUIRED_RPCNDR_H_VERSION__ 475 5 #endif 6 7 #include <rpc.h> 8 #include <rpcndr.h> 9 10 #ifndef COM_NO_WINDOWS_H 11 #include <windows.h> 12 #include <ole2.h> 13 #endif 14 15 #ifndef __audioclient_h__ 16 #define __audioclient_h__ 17 18 /* Forward declarations */ 19 20 #ifndef __IAudioClient_FWD_DEFINED__ 21 #define __IAudioClient_FWD_DEFINED__ 22 typedef interface IAudioClient IAudioClient; 23 #endif 24 25 #ifndef __IAudioClient2_FWD_DEFINED__ 26 #define __IAudioClient2_FWD_DEFINED__ 27 typedef interface IAudioClient2 IAudioClient2; 28 #endif 29 30 #ifndef __IAudioRenderClient_FWD_DEFINED__ 31 #define __IAudioRenderClient_FWD_DEFINED__ 32 typedef interface IAudioRenderClient IAudioRenderClient; 33 #endif 34 35 #ifndef __IAudioCaptureClient_FWD_DEFINED__ 36 #define __IAudioCaptureClient_FWD_DEFINED__ 37 typedef interface IAudioCaptureClient IAudioCaptureClient; 38 #endif 39 40 #ifndef __IAudioClock_FWD_DEFINED__ 41 #define __IAudioClock_FWD_DEFINED__ 42 typedef interface IAudioClock IAudioClock; 43 #endif 44 45 #ifndef __IAudioClock2_FWD_DEFINED__ 46 #define __IAudioClock2_FWD_DEFINED__ 47 typedef interface IAudioClock2 IAudioClock2; 48 #endif 49 50 #ifndef __IAudioClockAdjustment_FWD_DEFINED__ 51 #define __IAudioClockAdjustment_FWD_DEFINED__ 52 typedef interface IAudioClockAdjustment IAudioClockAdjustment; 53 #endif 54 55 #ifndef __ISimpleAudioVolume_FWD_DEFINED__ 56 #define __ISimpleAudioVolume_FWD_DEFINED__ 57 typedef interface ISimpleAudioVolume ISimpleAudioVolume; 58 #endif 59 60 #ifndef __IAudioStreamVolume_FWD_DEFINED__ 61 #define __IAudioStreamVolume_FWD_DEFINED__ 62 typedef interface IAudioStreamVolume IAudioStreamVolume; 63 #endif 64 65 #ifndef __IChannelAudioVolume_FWD_DEFINED__ 66 #define __IChannelAudioVolume_FWD_DEFINED__ 67 typedef interface IChannelAudioVolume IChannelAudioVolume; 68 #endif 69 70 /* Headers for imported files */ 71 72 #include <wtypes.h> 73 #include <unknwn.h> 74 #include <audiosessiontypes.h> 75 76 #ifdef __cplusplus 77 extern "C" { 78 #endif 79 80 #include <winapifamily.h> 81 82 83 #if 0 84 typedef struct WAVEFORMATEX { 85 WORD wFormatTag; 86 WORD nChannels; 87 DWORD nSamplesPerSec; 88 DWORD nAvgBytesPerSec; 89 WORD nBlockAlign; 90 WORD wBitsPerSample; 91 WORD cbSize; 92 } WAVEFORMATEX; 93 94 typedef LONGLONG REFERENCE_TIME; 95 #else 96 #define _IKsControl_ 97 98 #include <mmreg.h> 99 #include <ks.h> 100 #include <ksmedia.h> 101 #endif 102 103 104 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 105 enum _AUDCLNT_BUFFERFLAGS { 106 AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY = 0x1, 107 AUDCLNT_BUFFERFLAGS_SILENT = 0x2, 108 AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR = 0x4 109 }; 110 111 112 typedef struct AudioClientProperties { 113 UINT32 cbSize; 114 WINBOOL bIsOffload; 115 AUDIO_STREAM_CATEGORY eCategory; 116 } AudioClientProperties; 117 118 /***************************************************************************** 119 * IAudioClient interface 120 */ 121 #ifndef __IAudioClient_INTERFACE_DEFINED__ 122 #define __IAudioClient_INTERFACE_DEFINED__ 123 124 DEFINE_GUID(IID_IAudioClient, 0x1cb9ad4c, 0xdbfa, 0x4c32, 0xb1,0x78, 0xc2,0xf5,0x68,0xa7,0x03,0xb2); 125 #if defined(__cplusplus) && !defined(CINTERFACE) 126 MIDL_INTERFACE("1cb9ad4c-dbfa-4c32-b178-c2f568a703b2") 127 IAudioClient : public IUnknown 128 { 129 virtual HRESULT STDMETHODCALLTYPE Initialize( 130 AUDCLNT_SHAREMODE ShareMode, 131 DWORD StreamFlags, 132 REFERENCE_TIME hnsBufferDuration, 133 REFERENCE_TIME hnsPeriodicity, 134 const WAVEFORMATEX *pFormat, 135 LPCGUID AudioSessionGuid) = 0; 136 137 virtual HRESULT STDMETHODCALLTYPE GetBufferSize( 138 UINT32 *pNumBufferFrames) = 0; 139 140 virtual HRESULT STDMETHODCALLTYPE GetStreamLatency( 141 REFERENCE_TIME *phnsLatency) = 0; 142 143 virtual HRESULT STDMETHODCALLTYPE GetCurrentPadding( 144 UINT32 *pNumPaddingFrames) = 0; 145 146 virtual HRESULT STDMETHODCALLTYPE IsFormatSupported( 147 AUDCLNT_SHAREMODE ShareMode, 148 const WAVEFORMATEX *pFormat, 149 WAVEFORMATEX **ppClosestMatch) = 0; 150 151 virtual HRESULT STDMETHODCALLTYPE GetMixFormat( 152 WAVEFORMATEX **ppDeviceFormat) = 0; 153 154 virtual HRESULT STDMETHODCALLTYPE GetDevicePeriod( 155 REFERENCE_TIME *phnsDefaultDevicePeriod, 156 REFERENCE_TIME *phnsMinimumDevicePeriod) = 0; 157 158 virtual HRESULT STDMETHODCALLTYPE Start( 159 ) = 0; 160 161 virtual HRESULT STDMETHODCALLTYPE Stop( 162 ) = 0; 163 164 virtual HRESULT STDMETHODCALLTYPE Reset( 165 ) = 0; 166 167 virtual HRESULT STDMETHODCALLTYPE SetEventHandle( 168 HANDLE eventHandle) = 0; 169 170 virtual HRESULT STDMETHODCALLTYPE GetService( 171 REFIID riid, 172 void **ppv) = 0; 173 174 }; 175 #ifdef __CRT_UUID_DECL 176 __CRT_UUID_DECL(IAudioClient, 0x1cb9ad4c, 0xdbfa, 0x4c32, 0xb1,0x78, 0xc2,0xf5,0x68,0xa7,0x03,0xb2) 177 #endif 178 #else 179 typedef struct IAudioClientVtbl { 180 BEGIN_INTERFACE 181 182 /*** IUnknown methods ***/ 183 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 184 IAudioClient* This, 185 REFIID riid, 186 void **ppvObject); 187 188 ULONG (STDMETHODCALLTYPE *AddRef)( 189 IAudioClient* This); 190 191 ULONG (STDMETHODCALLTYPE *Release)( 192 IAudioClient* This); 193 194 /*** IAudioClient methods ***/ 195 HRESULT (STDMETHODCALLTYPE *Initialize)( 196 IAudioClient* This, 197 AUDCLNT_SHAREMODE ShareMode, 198 DWORD StreamFlags, 199 REFERENCE_TIME hnsBufferDuration, 200 REFERENCE_TIME hnsPeriodicity, 201 const WAVEFORMATEX *pFormat, 202 LPCGUID AudioSessionGuid); 203 204 HRESULT (STDMETHODCALLTYPE *GetBufferSize)( 205 IAudioClient* This, 206 UINT32 *pNumBufferFrames); 207 208 HRESULT (STDMETHODCALLTYPE *GetStreamLatency)( 209 IAudioClient* This, 210 REFERENCE_TIME *phnsLatency); 211 212 HRESULT (STDMETHODCALLTYPE *GetCurrentPadding)( 213 IAudioClient* This, 214 UINT32 *pNumPaddingFrames); 215 216 HRESULT (STDMETHODCALLTYPE *IsFormatSupported)( 217 IAudioClient* This, 218 AUDCLNT_SHAREMODE ShareMode, 219 const WAVEFORMATEX *pFormat, 220 WAVEFORMATEX **ppClosestMatch); 221 222 HRESULT (STDMETHODCALLTYPE *GetMixFormat)( 223 IAudioClient* This, 224 WAVEFORMATEX **ppDeviceFormat); 225 226 HRESULT (STDMETHODCALLTYPE *GetDevicePeriod)( 227 IAudioClient* This, 228 REFERENCE_TIME *phnsDefaultDevicePeriod, 229 REFERENCE_TIME *phnsMinimumDevicePeriod); 230 231 HRESULT (STDMETHODCALLTYPE *Start)( 232 IAudioClient* This); 233 234 HRESULT (STDMETHODCALLTYPE *Stop)( 235 IAudioClient* This); 236 237 HRESULT (STDMETHODCALLTYPE *Reset)( 238 IAudioClient* This); 239 240 HRESULT (STDMETHODCALLTYPE *SetEventHandle)( 241 IAudioClient* This, 242 HANDLE eventHandle); 243 244 HRESULT (STDMETHODCALLTYPE *GetService)( 245 IAudioClient* This, 246 REFIID riid, 247 void **ppv); 248 249 END_INTERFACE 250 } IAudioClientVtbl; 251 interface IAudioClient { 252 CONST_VTBL IAudioClientVtbl* lpVtbl; 253 }; 254 255 #ifdef COBJMACROS 256 #ifndef WIDL_C_INLINE_WRAPPERS 257 /*** IUnknown methods ***/ 258 #define IAudioClient_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 259 #define IAudioClient_AddRef(This) (This)->lpVtbl->AddRef(This) 260 #define IAudioClient_Release(This) (This)->lpVtbl->Release(This) 261 /*** IAudioClient methods ***/ 262 #define IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) (This)->lpVtbl->Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) 263 #define IAudioClient_GetBufferSize(This,pNumBufferFrames) (This)->lpVtbl->GetBufferSize(This,pNumBufferFrames) 264 #define IAudioClient_GetStreamLatency(This,phnsLatency) (This)->lpVtbl->GetStreamLatency(This,phnsLatency) 265 #define IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) (This)->lpVtbl->GetCurrentPadding(This,pNumPaddingFrames) 266 #define IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) (This)->lpVtbl->IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) 267 #define IAudioClient_GetMixFormat(This,ppDeviceFormat) (This)->lpVtbl->GetMixFormat(This,ppDeviceFormat) 268 #define IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) (This)->lpVtbl->GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) 269 #define IAudioClient_Start(This) (This)->lpVtbl->Start(This) 270 #define IAudioClient_Stop(This) (This)->lpVtbl->Stop(This) 271 #define IAudioClient_Reset(This) (This)->lpVtbl->Reset(This) 272 #define IAudioClient_SetEventHandle(This,eventHandle) (This)->lpVtbl->SetEventHandle(This,eventHandle) 273 #define IAudioClient_GetService(This,riid,ppv) (This)->lpVtbl->GetService(This,riid,ppv) 274 #else 275 /*** IUnknown methods ***/ 276 static FORCEINLINE HRESULT IAudioClient_QueryInterface(IAudioClient* This,REFIID riid,void **ppvObject) { 277 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 278 } 279 static FORCEINLINE ULONG IAudioClient_AddRef(IAudioClient* This) { 280 return This->lpVtbl->AddRef(This); 281 } 282 static FORCEINLINE ULONG IAudioClient_Release(IAudioClient* This) { 283 return This->lpVtbl->Release(This); 284 } 285 /*** IAudioClient methods ***/ 286 static FORCEINLINE HRESULT IAudioClient_Initialize(IAudioClient* This,AUDCLNT_SHAREMODE ShareMode,DWORD StreamFlags,REFERENCE_TIME hnsBufferDuration,REFERENCE_TIME hnsPeriodicity,const WAVEFORMATEX *pFormat,LPCGUID AudioSessionGuid) { 287 return This->lpVtbl->Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid); 288 } 289 static FORCEINLINE HRESULT IAudioClient_GetBufferSize(IAudioClient* This,UINT32 *pNumBufferFrames) { 290 return This->lpVtbl->GetBufferSize(This,pNumBufferFrames); 291 } 292 static FORCEINLINE HRESULT IAudioClient_GetStreamLatency(IAudioClient* This,REFERENCE_TIME *phnsLatency) { 293 return This->lpVtbl->GetStreamLatency(This,phnsLatency); 294 } 295 static FORCEINLINE HRESULT IAudioClient_GetCurrentPadding(IAudioClient* This,UINT32 *pNumPaddingFrames) { 296 return This->lpVtbl->GetCurrentPadding(This,pNumPaddingFrames); 297 } 298 static FORCEINLINE HRESULT IAudioClient_IsFormatSupported(IAudioClient* This,AUDCLNT_SHAREMODE ShareMode,const WAVEFORMATEX *pFormat,WAVEFORMATEX **ppClosestMatch) { 299 return This->lpVtbl->IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch); 300 } 301 static FORCEINLINE HRESULT IAudioClient_GetMixFormat(IAudioClient* This,WAVEFORMATEX **ppDeviceFormat) { 302 return This->lpVtbl->GetMixFormat(This,ppDeviceFormat); 303 } 304 static FORCEINLINE HRESULT IAudioClient_GetDevicePeriod(IAudioClient* This,REFERENCE_TIME *phnsDefaultDevicePeriod,REFERENCE_TIME *phnsMinimumDevicePeriod) { 305 return This->lpVtbl->GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod); 306 } 307 static FORCEINLINE HRESULT IAudioClient_Start(IAudioClient* This) { 308 return This->lpVtbl->Start(This); 309 } 310 static FORCEINLINE HRESULT IAudioClient_Stop(IAudioClient* This) { 311 return This->lpVtbl->Stop(This); 312 } 313 static FORCEINLINE HRESULT IAudioClient_Reset(IAudioClient* This) { 314 return This->lpVtbl->Reset(This); 315 } 316 static FORCEINLINE HRESULT IAudioClient_SetEventHandle(IAudioClient* This,HANDLE eventHandle) { 317 return This->lpVtbl->SetEventHandle(This,eventHandle); 318 } 319 static FORCEINLINE HRESULT IAudioClient_GetService(IAudioClient* This,REFIID riid,void **ppv) { 320 return This->lpVtbl->GetService(This,riid,ppv); 321 } 322 #endif 323 #endif 324 325 #endif 326 327 HRESULT STDMETHODCALLTYPE IAudioClient_Initialize_Proxy( 328 IAudioClient* This, 329 AUDCLNT_SHAREMODE ShareMode, 330 DWORD StreamFlags, 331 REFERENCE_TIME hnsBufferDuration, 332 REFERENCE_TIME hnsPeriodicity, 333 const WAVEFORMATEX *pFormat, 334 LPCGUID AudioSessionGuid); 335 void __RPC_STUB IAudioClient_Initialize_Stub( 336 IRpcStubBuffer* This, 337 IRpcChannelBuffer* pRpcChannelBuffer, 338 PRPC_MESSAGE pRpcMessage, 339 DWORD* pdwStubPhase); 340 HRESULT STDMETHODCALLTYPE IAudioClient_GetBufferSize_Proxy( 341 IAudioClient* This, 342 UINT32 *pNumBufferFrames); 343 void __RPC_STUB IAudioClient_GetBufferSize_Stub( 344 IRpcStubBuffer* This, 345 IRpcChannelBuffer* pRpcChannelBuffer, 346 PRPC_MESSAGE pRpcMessage, 347 DWORD* pdwStubPhase); 348 HRESULT STDMETHODCALLTYPE IAudioClient_GetStreamLatency_Proxy( 349 IAudioClient* This, 350 REFERENCE_TIME *phnsLatency); 351 void __RPC_STUB IAudioClient_GetStreamLatency_Stub( 352 IRpcStubBuffer* This, 353 IRpcChannelBuffer* pRpcChannelBuffer, 354 PRPC_MESSAGE pRpcMessage, 355 DWORD* pdwStubPhase); 356 HRESULT STDMETHODCALLTYPE IAudioClient_GetCurrentPadding_Proxy( 357 IAudioClient* This, 358 UINT32 *pNumPaddingFrames); 359 void __RPC_STUB IAudioClient_GetCurrentPadding_Stub( 360 IRpcStubBuffer* This, 361 IRpcChannelBuffer* pRpcChannelBuffer, 362 PRPC_MESSAGE pRpcMessage, 363 DWORD* pdwStubPhase); 364 HRESULT STDMETHODCALLTYPE IAudioClient_IsFormatSupported_Proxy( 365 IAudioClient* This, 366 AUDCLNT_SHAREMODE ShareMode, 367 const WAVEFORMATEX *pFormat, 368 WAVEFORMATEX **ppClosestMatch); 369 void __RPC_STUB IAudioClient_IsFormatSupported_Stub( 370 IRpcStubBuffer* This, 371 IRpcChannelBuffer* pRpcChannelBuffer, 372 PRPC_MESSAGE pRpcMessage, 373 DWORD* pdwStubPhase); 374 HRESULT STDMETHODCALLTYPE IAudioClient_GetMixFormat_Proxy( 375 IAudioClient* This, 376 WAVEFORMATEX **ppDeviceFormat); 377 void __RPC_STUB IAudioClient_GetMixFormat_Stub( 378 IRpcStubBuffer* This, 379 IRpcChannelBuffer* pRpcChannelBuffer, 380 PRPC_MESSAGE pRpcMessage, 381 DWORD* pdwStubPhase); 382 HRESULT STDMETHODCALLTYPE IAudioClient_GetDevicePeriod_Proxy( 383 IAudioClient* This, 384 REFERENCE_TIME *phnsDefaultDevicePeriod, 385 REFERENCE_TIME *phnsMinimumDevicePeriod); 386 void __RPC_STUB IAudioClient_GetDevicePeriod_Stub( 387 IRpcStubBuffer* This, 388 IRpcChannelBuffer* pRpcChannelBuffer, 389 PRPC_MESSAGE pRpcMessage, 390 DWORD* pdwStubPhase); 391 HRESULT STDMETHODCALLTYPE IAudioClient_Start_Proxy( 392 IAudioClient* This); 393 void __RPC_STUB IAudioClient_Start_Stub( 394 IRpcStubBuffer* This, 395 IRpcChannelBuffer* pRpcChannelBuffer, 396 PRPC_MESSAGE pRpcMessage, 397 DWORD* pdwStubPhase); 398 HRESULT STDMETHODCALLTYPE IAudioClient_Stop_Proxy( 399 IAudioClient* This); 400 void __RPC_STUB IAudioClient_Stop_Stub( 401 IRpcStubBuffer* This, 402 IRpcChannelBuffer* pRpcChannelBuffer, 403 PRPC_MESSAGE pRpcMessage, 404 DWORD* pdwStubPhase); 405 HRESULT STDMETHODCALLTYPE IAudioClient_Reset_Proxy( 406 IAudioClient* This); 407 void __RPC_STUB IAudioClient_Reset_Stub( 408 IRpcStubBuffer* This, 409 IRpcChannelBuffer* pRpcChannelBuffer, 410 PRPC_MESSAGE pRpcMessage, 411 DWORD* pdwStubPhase); 412 HRESULT STDMETHODCALLTYPE IAudioClient_SetEventHandle_Proxy( 413 IAudioClient* This, 414 HANDLE eventHandle); 415 void __RPC_STUB IAudioClient_SetEventHandle_Stub( 416 IRpcStubBuffer* This, 417 IRpcChannelBuffer* pRpcChannelBuffer, 418 PRPC_MESSAGE pRpcMessage, 419 DWORD* pdwStubPhase); 420 HRESULT STDMETHODCALLTYPE IAudioClient_GetService_Proxy( 421 IAudioClient* This, 422 REFIID riid, 423 void **ppv); 424 void __RPC_STUB IAudioClient_GetService_Stub( 425 IRpcStubBuffer* This, 426 IRpcChannelBuffer* pRpcChannelBuffer, 427 PRPC_MESSAGE pRpcMessage, 428 DWORD* pdwStubPhase); 429 430 #endif /* __IAudioClient_INTERFACE_DEFINED__ */ 431 432 433 /***************************************************************************** 434 * IAudioClient2 interface 435 */ 436 #ifndef __IAudioClient2_INTERFACE_DEFINED__ 437 #define __IAudioClient2_INTERFACE_DEFINED__ 438 439 DEFINE_GUID(IID_IAudioClient2, 0x726778cd, 0xf60a, 0x4eda, 0x82,0xde, 0xe4,0x76,0x10,0xcd,0x78,0xaa); 440 #if defined(__cplusplus) && !defined(CINTERFACE) 441 MIDL_INTERFACE("726778cd-f60a-4eda-82de-e47610cd78aa") 442 IAudioClient2 : public IAudioClient 443 { 444 virtual HRESULT STDMETHODCALLTYPE IsOffloadCapable( 445 AUDIO_STREAM_CATEGORY Category, 446 WINBOOL *pbOffloadCapable) = 0; 447 448 virtual HRESULT STDMETHODCALLTYPE SetClientProperties( 449 const AudioClientProperties *pProperties) = 0; 450 451 virtual HRESULT STDMETHODCALLTYPE GetBufferSizeLimits( 452 const WAVEFORMATEX *pFormat, 453 WINBOOL bEventDriven, 454 REFERENCE_TIME *phnsMinBufferDuration, 455 REFERENCE_TIME *phnsMaxBufferDuration) = 0; 456 457 }; 458 #ifdef __CRT_UUID_DECL 459 __CRT_UUID_DECL(IAudioClient2, 0x726778cd, 0xf60a, 0x4eda, 0x82,0xde, 0xe4,0x76,0x10,0xcd,0x78,0xaa) 460 #endif 461 #else 462 typedef struct IAudioClient2Vtbl { 463 BEGIN_INTERFACE 464 465 /*** IUnknown methods ***/ 466 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 467 IAudioClient2* This, 468 REFIID riid, 469 void **ppvObject); 470 471 ULONG (STDMETHODCALLTYPE *AddRef)( 472 IAudioClient2* This); 473 474 ULONG (STDMETHODCALLTYPE *Release)( 475 IAudioClient2* This); 476 477 /*** IAudioClient methods ***/ 478 HRESULT (STDMETHODCALLTYPE *Initialize)( 479 IAudioClient2* This, 480 AUDCLNT_SHAREMODE ShareMode, 481 DWORD StreamFlags, 482 REFERENCE_TIME hnsBufferDuration, 483 REFERENCE_TIME hnsPeriodicity, 484 const WAVEFORMATEX *pFormat, 485 LPCGUID AudioSessionGuid); 486 487 HRESULT (STDMETHODCALLTYPE *GetBufferSize)( 488 IAudioClient2* This, 489 UINT32 *pNumBufferFrames); 490 491 HRESULT (STDMETHODCALLTYPE *GetStreamLatency)( 492 IAudioClient2* This, 493 REFERENCE_TIME *phnsLatency); 494 495 HRESULT (STDMETHODCALLTYPE *GetCurrentPadding)( 496 IAudioClient2* This, 497 UINT32 *pNumPaddingFrames); 498 499 HRESULT (STDMETHODCALLTYPE *IsFormatSupported)( 500 IAudioClient2* This, 501 AUDCLNT_SHAREMODE ShareMode, 502 const WAVEFORMATEX *pFormat, 503 WAVEFORMATEX **ppClosestMatch); 504 505 HRESULT (STDMETHODCALLTYPE *GetMixFormat)( 506 IAudioClient2* This, 507 WAVEFORMATEX **ppDeviceFormat); 508 509 HRESULT (STDMETHODCALLTYPE *GetDevicePeriod)( 510 IAudioClient2* This, 511 REFERENCE_TIME *phnsDefaultDevicePeriod, 512 REFERENCE_TIME *phnsMinimumDevicePeriod); 513 514 HRESULT (STDMETHODCALLTYPE *Start)( 515 IAudioClient2* This); 516 517 HRESULT (STDMETHODCALLTYPE *Stop)( 518 IAudioClient2* This); 519 520 HRESULT (STDMETHODCALLTYPE *Reset)( 521 IAudioClient2* This); 522 523 HRESULT (STDMETHODCALLTYPE *SetEventHandle)( 524 IAudioClient2* This, 525 HANDLE eventHandle); 526 527 HRESULT (STDMETHODCALLTYPE *GetService)( 528 IAudioClient2* This, 529 REFIID riid, 530 void **ppv); 531 532 /*** IAudioClient2 methods ***/ 533 HRESULT (STDMETHODCALLTYPE *IsOffloadCapable)( 534 IAudioClient2* This, 535 AUDIO_STREAM_CATEGORY Category, 536 WINBOOL *pbOffloadCapable); 537 538 HRESULT (STDMETHODCALLTYPE *SetClientProperties)( 539 IAudioClient2* This, 540 const AudioClientProperties *pProperties); 541 542 HRESULT (STDMETHODCALLTYPE *GetBufferSizeLimits)( 543 IAudioClient2* This, 544 const WAVEFORMATEX *pFormat, 545 WINBOOL bEventDriven, 546 REFERENCE_TIME *phnsMinBufferDuration, 547 REFERENCE_TIME *phnsMaxBufferDuration); 548 549 END_INTERFACE 550 } IAudioClient2Vtbl; 551 interface IAudioClient2 { 552 CONST_VTBL IAudioClient2Vtbl* lpVtbl; 553 }; 554 555 #ifdef COBJMACROS 556 #ifndef WIDL_C_INLINE_WRAPPERS 557 /*** IUnknown methods ***/ 558 #define IAudioClient2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 559 #define IAudioClient2_AddRef(This) (This)->lpVtbl->AddRef(This) 560 #define IAudioClient2_Release(This) (This)->lpVtbl->Release(This) 561 /*** IAudioClient methods ***/ 562 #define IAudioClient2_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) (This)->lpVtbl->Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) 563 #define IAudioClient2_GetBufferSize(This,pNumBufferFrames) (This)->lpVtbl->GetBufferSize(This,pNumBufferFrames) 564 #define IAudioClient2_GetStreamLatency(This,phnsLatency) (This)->lpVtbl->GetStreamLatency(This,phnsLatency) 565 #define IAudioClient2_GetCurrentPadding(This,pNumPaddingFrames) (This)->lpVtbl->GetCurrentPadding(This,pNumPaddingFrames) 566 #define IAudioClient2_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) (This)->lpVtbl->IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) 567 #define IAudioClient2_GetMixFormat(This,ppDeviceFormat) (This)->lpVtbl->GetMixFormat(This,ppDeviceFormat) 568 #define IAudioClient2_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) (This)->lpVtbl->GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) 569 #define IAudioClient2_Start(This) (This)->lpVtbl->Start(This) 570 #define IAudioClient2_Stop(This) (This)->lpVtbl->Stop(This) 571 #define IAudioClient2_Reset(This) (This)->lpVtbl->Reset(This) 572 #define IAudioClient2_SetEventHandle(This,eventHandle) (This)->lpVtbl->SetEventHandle(This,eventHandle) 573 #define IAudioClient2_GetService(This,riid,ppv) (This)->lpVtbl->GetService(This,riid,ppv) 574 /*** IAudioClient2 methods ***/ 575 #define IAudioClient2_IsOffloadCapable(This,Category,pbOffloadCapable) (This)->lpVtbl->IsOffloadCapable(This,Category,pbOffloadCapable) 576 #define IAudioClient2_SetClientProperties(This,pProperties) (This)->lpVtbl->SetClientProperties(This,pProperties) 577 #define IAudioClient2_GetBufferSizeLimits(This,pFormat,bEventDriven,phnsMinBufferDuration,phnsMaxBufferDuration) (This)->lpVtbl->GetBufferSizeLimits(This,pFormat,bEventDriven,phnsMinBufferDuration,phnsMaxBufferDuration) 578 #else 579 /*** IUnknown methods ***/ 580 static FORCEINLINE HRESULT IAudioClient2_QueryInterface(IAudioClient2* This,REFIID riid,void **ppvObject) { 581 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 582 } 583 static FORCEINLINE ULONG IAudioClient2_AddRef(IAudioClient2* This) { 584 return This->lpVtbl->AddRef(This); 585 } 586 static FORCEINLINE ULONG IAudioClient2_Release(IAudioClient2* This) { 587 return This->lpVtbl->Release(This); 588 } 589 /*** IAudioClient methods ***/ 590 static FORCEINLINE HRESULT IAudioClient2_Initialize(IAudioClient2* This,AUDCLNT_SHAREMODE ShareMode,DWORD StreamFlags,REFERENCE_TIME hnsBufferDuration,REFERENCE_TIME hnsPeriodicity,const WAVEFORMATEX *pFormat,LPCGUID AudioSessionGuid) { 591 return This->lpVtbl->Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid); 592 } 593 static FORCEINLINE HRESULT IAudioClient2_GetBufferSize(IAudioClient2* This,UINT32 *pNumBufferFrames) { 594 return This->lpVtbl->GetBufferSize(This,pNumBufferFrames); 595 } 596 static FORCEINLINE HRESULT IAudioClient2_GetStreamLatency(IAudioClient2* This,REFERENCE_TIME *phnsLatency) { 597 return This->lpVtbl->GetStreamLatency(This,phnsLatency); 598 } 599 static FORCEINLINE HRESULT IAudioClient2_GetCurrentPadding(IAudioClient2* This,UINT32 *pNumPaddingFrames) { 600 return This->lpVtbl->GetCurrentPadding(This,pNumPaddingFrames); 601 } 602 static FORCEINLINE HRESULT IAudioClient2_IsFormatSupported(IAudioClient2* This,AUDCLNT_SHAREMODE ShareMode,const WAVEFORMATEX *pFormat,WAVEFORMATEX **ppClosestMatch) { 603 return This->lpVtbl->IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch); 604 } 605 static FORCEINLINE HRESULT IAudioClient2_GetMixFormat(IAudioClient2* This,WAVEFORMATEX **ppDeviceFormat) { 606 return This->lpVtbl->GetMixFormat(This,ppDeviceFormat); 607 } 608 static FORCEINLINE HRESULT IAudioClient2_GetDevicePeriod(IAudioClient2* This,REFERENCE_TIME *phnsDefaultDevicePeriod,REFERENCE_TIME *phnsMinimumDevicePeriod) { 609 return This->lpVtbl->GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod); 610 } 611 static FORCEINLINE HRESULT IAudioClient2_Start(IAudioClient2* This) { 612 return This->lpVtbl->Start(This); 613 } 614 static FORCEINLINE HRESULT IAudioClient2_Stop(IAudioClient2* This) { 615 return This->lpVtbl->Stop(This); 616 } 617 static FORCEINLINE HRESULT IAudioClient2_Reset(IAudioClient2* This) { 618 return This->lpVtbl->Reset(This); 619 } 620 static FORCEINLINE HRESULT IAudioClient2_SetEventHandle(IAudioClient2* This,HANDLE eventHandle) { 621 return This->lpVtbl->SetEventHandle(This,eventHandle); 622 } 623 static FORCEINLINE HRESULT IAudioClient2_GetService(IAudioClient2* This,REFIID riid,void **ppv) { 624 return This->lpVtbl->GetService(This,riid,ppv); 625 } 626 /*** IAudioClient2 methods ***/ 627 static FORCEINLINE HRESULT IAudioClient2_IsOffloadCapable(IAudioClient2* This,AUDIO_STREAM_CATEGORY Category,WINBOOL *pbOffloadCapable) { 628 return This->lpVtbl->IsOffloadCapable(This,Category,pbOffloadCapable); 629 } 630 static FORCEINLINE HRESULT IAudioClient2_SetClientProperties(IAudioClient2* This,const AudioClientProperties *pProperties) { 631 return This->lpVtbl->SetClientProperties(This,pProperties); 632 } 633 static FORCEINLINE HRESULT IAudioClient2_GetBufferSizeLimits(IAudioClient2* This,const WAVEFORMATEX *pFormat,WINBOOL bEventDriven,REFERENCE_TIME *phnsMinBufferDuration,REFERENCE_TIME *phnsMaxBufferDuration) { 634 return This->lpVtbl->GetBufferSizeLimits(This,pFormat,bEventDriven,phnsMinBufferDuration,phnsMaxBufferDuration); 635 } 636 #endif 637 #endif 638 639 #endif 640 641 HRESULT STDMETHODCALLTYPE IAudioClient2_IsOffloadCapable_Proxy( 642 IAudioClient2* This, 643 AUDIO_STREAM_CATEGORY Category, 644 WINBOOL *pbOffloadCapable); 645 void __RPC_STUB IAudioClient2_IsOffloadCapable_Stub( 646 IRpcStubBuffer* This, 647 IRpcChannelBuffer* pRpcChannelBuffer, 648 PRPC_MESSAGE pRpcMessage, 649 DWORD* pdwStubPhase); 650 HRESULT STDMETHODCALLTYPE IAudioClient2_SetClientProperties_Proxy( 651 IAudioClient2* This, 652 const AudioClientProperties *pProperties); 653 void __RPC_STUB IAudioClient2_SetClientProperties_Stub( 654 IRpcStubBuffer* This, 655 IRpcChannelBuffer* pRpcChannelBuffer, 656 PRPC_MESSAGE pRpcMessage, 657 DWORD* pdwStubPhase); 658 HRESULT STDMETHODCALLTYPE IAudioClient2_GetBufferSizeLimits_Proxy( 659 IAudioClient2* This, 660 const WAVEFORMATEX *pFormat, 661 WINBOOL bEventDriven, 662 REFERENCE_TIME *phnsMinBufferDuration, 663 REFERENCE_TIME *phnsMaxBufferDuration); 664 void __RPC_STUB IAudioClient2_GetBufferSizeLimits_Stub( 665 IRpcStubBuffer* This, 666 IRpcChannelBuffer* pRpcChannelBuffer, 667 PRPC_MESSAGE pRpcMessage, 668 DWORD* pdwStubPhase); 669 670 #endif /* __IAudioClient2_INTERFACE_DEFINED__ */ 671 672 673 /***************************************************************************** 674 * IAudioRenderClient interface 675 */ 676 #ifndef __IAudioRenderClient_INTERFACE_DEFINED__ 677 #define __IAudioRenderClient_INTERFACE_DEFINED__ 678 679 DEFINE_GUID(IID_IAudioRenderClient, 0xf294acfc, 0x3146, 0x4483, 0xa7,0xbf, 0xad,0xdc,0xa7,0xc2,0x60,0xe2); 680 #if defined(__cplusplus) && !defined(CINTERFACE) 681 MIDL_INTERFACE("f294acfc-3146-4483-a7bf-addca7c260e2") 682 IAudioRenderClient : public IUnknown 683 { 684 virtual HRESULT STDMETHODCALLTYPE GetBuffer( 685 UINT32 NumFramesRequested, 686 BYTE **ppData) = 0; 687 688 virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 689 UINT32 NumFramesWritten, 690 DWORD dwFlags) = 0; 691 692 }; 693 #ifdef __CRT_UUID_DECL 694 __CRT_UUID_DECL(IAudioRenderClient, 0xf294acfc, 0x3146, 0x4483, 0xa7,0xbf, 0xad,0xdc,0xa7,0xc2,0x60,0xe2) 695 #endif 696 #else 697 typedef struct IAudioRenderClientVtbl { 698 BEGIN_INTERFACE 699 700 /*** IUnknown methods ***/ 701 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 702 IAudioRenderClient* This, 703 REFIID riid, 704 void **ppvObject); 705 706 ULONG (STDMETHODCALLTYPE *AddRef)( 707 IAudioRenderClient* This); 708 709 ULONG (STDMETHODCALLTYPE *Release)( 710 IAudioRenderClient* This); 711 712 /*** IAudioRenderClient methods ***/ 713 HRESULT (STDMETHODCALLTYPE *GetBuffer)( 714 IAudioRenderClient* This, 715 UINT32 NumFramesRequested, 716 BYTE **ppData); 717 718 HRESULT (STDMETHODCALLTYPE *ReleaseBuffer)( 719 IAudioRenderClient* This, 720 UINT32 NumFramesWritten, 721 DWORD dwFlags); 722 723 END_INTERFACE 724 } IAudioRenderClientVtbl; 725 interface IAudioRenderClient { 726 CONST_VTBL IAudioRenderClientVtbl* lpVtbl; 727 }; 728 729 #ifdef COBJMACROS 730 #ifndef WIDL_C_INLINE_WRAPPERS 731 /*** IUnknown methods ***/ 732 #define IAudioRenderClient_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 733 #define IAudioRenderClient_AddRef(This) (This)->lpVtbl->AddRef(This) 734 #define IAudioRenderClient_Release(This) (This)->lpVtbl->Release(This) 735 /*** IAudioRenderClient methods ***/ 736 #define IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) (This)->lpVtbl->GetBuffer(This,NumFramesRequested,ppData) 737 #define IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) (This)->lpVtbl->ReleaseBuffer(This,NumFramesWritten,dwFlags) 738 #else 739 /*** IUnknown methods ***/ 740 static FORCEINLINE HRESULT IAudioRenderClient_QueryInterface(IAudioRenderClient* This,REFIID riid,void **ppvObject) { 741 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 742 } 743 static FORCEINLINE ULONG IAudioRenderClient_AddRef(IAudioRenderClient* This) { 744 return This->lpVtbl->AddRef(This); 745 } 746 static FORCEINLINE ULONG IAudioRenderClient_Release(IAudioRenderClient* This) { 747 return This->lpVtbl->Release(This); 748 } 749 /*** IAudioRenderClient methods ***/ 750 static FORCEINLINE HRESULT IAudioRenderClient_GetBuffer(IAudioRenderClient* This,UINT32 NumFramesRequested,BYTE **ppData) { 751 return This->lpVtbl->GetBuffer(This,NumFramesRequested,ppData); 752 } 753 static FORCEINLINE HRESULT IAudioRenderClient_ReleaseBuffer(IAudioRenderClient* This,UINT32 NumFramesWritten,DWORD dwFlags) { 754 return This->lpVtbl->ReleaseBuffer(This,NumFramesWritten,dwFlags); 755 } 756 #endif 757 #endif 758 759 #endif 760 761 HRESULT STDMETHODCALLTYPE IAudioRenderClient_GetBuffer_Proxy( 762 IAudioRenderClient* This, 763 UINT32 NumFramesRequested, 764 BYTE **ppData); 765 void __RPC_STUB IAudioRenderClient_GetBuffer_Stub( 766 IRpcStubBuffer* This, 767 IRpcChannelBuffer* pRpcChannelBuffer, 768 PRPC_MESSAGE pRpcMessage, 769 DWORD* pdwStubPhase); 770 HRESULT STDMETHODCALLTYPE IAudioRenderClient_ReleaseBuffer_Proxy( 771 IAudioRenderClient* This, 772 UINT32 NumFramesWritten, 773 DWORD dwFlags); 774 void __RPC_STUB IAudioRenderClient_ReleaseBuffer_Stub( 775 IRpcStubBuffer* This, 776 IRpcChannelBuffer* pRpcChannelBuffer, 777 PRPC_MESSAGE pRpcMessage, 778 DWORD* pdwStubPhase); 779 780 #endif /* __IAudioRenderClient_INTERFACE_DEFINED__ */ 781 782 783 /***************************************************************************** 784 * IAudioCaptureClient interface 785 */ 786 #ifndef __IAudioCaptureClient_INTERFACE_DEFINED__ 787 #define __IAudioCaptureClient_INTERFACE_DEFINED__ 788 789 DEFINE_GUID(IID_IAudioCaptureClient, 0xc8adbd64, 0xe71e, 0x48a0, 0xa4,0xde, 0x18,0x5c,0x39,0x5c,0xd3,0x17); 790 #if defined(__cplusplus) && !defined(CINTERFACE) 791 MIDL_INTERFACE("c8adbd64-e71e-48a0-a4de-185c395cd317") 792 IAudioCaptureClient : public IUnknown 793 { 794 virtual HRESULT STDMETHODCALLTYPE GetBuffer( 795 BYTE **ppData, 796 UINT32 *pNumFramesToRead, 797 DWORD *pdwFlags, 798 UINT64 *pu64DevicePosition, 799 UINT64 *pu64QPCPosition) = 0; 800 801 virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 802 UINT32 NumFramesRead) = 0; 803 804 virtual HRESULT STDMETHODCALLTYPE GetNextPacketSize( 805 UINT32 *pNumFramesInNextPacket) = 0; 806 807 }; 808 #ifdef __CRT_UUID_DECL 809 __CRT_UUID_DECL(IAudioCaptureClient, 0xc8adbd64, 0xe71e, 0x48a0, 0xa4,0xde, 0x18,0x5c,0x39,0x5c,0xd3,0x17) 810 #endif 811 #else 812 typedef struct IAudioCaptureClientVtbl { 813 BEGIN_INTERFACE 814 815 /*** IUnknown methods ***/ 816 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 817 IAudioCaptureClient* This, 818 REFIID riid, 819 void **ppvObject); 820 821 ULONG (STDMETHODCALLTYPE *AddRef)( 822 IAudioCaptureClient* This); 823 824 ULONG (STDMETHODCALLTYPE *Release)( 825 IAudioCaptureClient* This); 826 827 /*** IAudioCaptureClient methods ***/ 828 HRESULT (STDMETHODCALLTYPE *GetBuffer)( 829 IAudioCaptureClient* This, 830 BYTE **ppData, 831 UINT32 *pNumFramesToRead, 832 DWORD *pdwFlags, 833 UINT64 *pu64DevicePosition, 834 UINT64 *pu64QPCPosition); 835 836 HRESULT (STDMETHODCALLTYPE *ReleaseBuffer)( 837 IAudioCaptureClient* This, 838 UINT32 NumFramesRead); 839 840 HRESULT (STDMETHODCALLTYPE *GetNextPacketSize)( 841 IAudioCaptureClient* This, 842 UINT32 *pNumFramesInNextPacket); 843 844 END_INTERFACE 845 } IAudioCaptureClientVtbl; 846 interface IAudioCaptureClient { 847 CONST_VTBL IAudioCaptureClientVtbl* lpVtbl; 848 }; 849 850 #ifdef COBJMACROS 851 #ifndef WIDL_C_INLINE_WRAPPERS 852 /*** IUnknown methods ***/ 853 #define IAudioCaptureClient_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 854 #define IAudioCaptureClient_AddRef(This) (This)->lpVtbl->AddRef(This) 855 #define IAudioCaptureClient_Release(This) (This)->lpVtbl->Release(This) 856 /*** IAudioCaptureClient methods ***/ 857 #define IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) (This)->lpVtbl->GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) 858 #define IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead) (This)->lpVtbl->ReleaseBuffer(This,NumFramesRead) 859 #define IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket) (This)->lpVtbl->GetNextPacketSize(This,pNumFramesInNextPacket) 860 #else 861 /*** IUnknown methods ***/ 862 static FORCEINLINE HRESULT IAudioCaptureClient_QueryInterface(IAudioCaptureClient* This,REFIID riid,void **ppvObject) { 863 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 864 } 865 static FORCEINLINE ULONG IAudioCaptureClient_AddRef(IAudioCaptureClient* This) { 866 return This->lpVtbl->AddRef(This); 867 } 868 static FORCEINLINE ULONG IAudioCaptureClient_Release(IAudioCaptureClient* This) { 869 return This->lpVtbl->Release(This); 870 } 871 /*** IAudioCaptureClient methods ***/ 872 static FORCEINLINE HRESULT IAudioCaptureClient_GetBuffer(IAudioCaptureClient* This,BYTE **ppData,UINT32 *pNumFramesToRead,DWORD *pdwFlags,UINT64 *pu64DevicePosition,UINT64 *pu64QPCPosition) { 873 return This->lpVtbl->GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition); 874 } 875 static FORCEINLINE HRESULT IAudioCaptureClient_ReleaseBuffer(IAudioCaptureClient* This,UINT32 NumFramesRead) { 876 return This->lpVtbl->ReleaseBuffer(This,NumFramesRead); 877 } 878 static FORCEINLINE HRESULT IAudioCaptureClient_GetNextPacketSize(IAudioCaptureClient* This,UINT32 *pNumFramesInNextPacket) { 879 return This->lpVtbl->GetNextPacketSize(This,pNumFramesInNextPacket); 880 } 881 #endif 882 #endif 883 884 #endif 885 886 HRESULT STDMETHODCALLTYPE IAudioCaptureClient_GetBuffer_Proxy( 887 IAudioCaptureClient* This, 888 BYTE **ppData, 889 UINT32 *pNumFramesToRead, 890 DWORD *pdwFlags, 891 UINT64 *pu64DevicePosition, 892 UINT64 *pu64QPCPosition); 893 void __RPC_STUB IAudioCaptureClient_GetBuffer_Stub( 894 IRpcStubBuffer* This, 895 IRpcChannelBuffer* pRpcChannelBuffer, 896 PRPC_MESSAGE pRpcMessage, 897 DWORD* pdwStubPhase); 898 HRESULT STDMETHODCALLTYPE IAudioCaptureClient_ReleaseBuffer_Proxy( 899 IAudioCaptureClient* This, 900 UINT32 NumFramesRead); 901 void __RPC_STUB IAudioCaptureClient_ReleaseBuffer_Stub( 902 IRpcStubBuffer* This, 903 IRpcChannelBuffer* pRpcChannelBuffer, 904 PRPC_MESSAGE pRpcMessage, 905 DWORD* pdwStubPhase); 906 HRESULT STDMETHODCALLTYPE IAudioCaptureClient_GetNextPacketSize_Proxy( 907 IAudioCaptureClient* This, 908 UINT32 *pNumFramesInNextPacket); 909 void __RPC_STUB IAudioCaptureClient_GetNextPacketSize_Stub( 910 IRpcStubBuffer* This, 911 IRpcChannelBuffer* pRpcChannelBuffer, 912 PRPC_MESSAGE pRpcMessage, 913 DWORD* pdwStubPhase); 914 915 #endif /* __IAudioCaptureClient_INTERFACE_DEFINED__ */ 916 917 918 #define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ 0x1 919 920 /***************************************************************************** 921 * IAudioClock interface 922 */ 923 #ifndef __IAudioClock_INTERFACE_DEFINED__ 924 #define __IAudioClock_INTERFACE_DEFINED__ 925 926 DEFINE_GUID(IID_IAudioClock, 0xcd63314f, 0x3fba, 0x4a1b, 0x81,0x2c, 0xef,0x96,0x35,0x87,0x28,0xe7); 927 #if defined(__cplusplus) && !defined(CINTERFACE) 928 MIDL_INTERFACE("cd63314f-3fba-4a1b-812c-ef96358728e7") 929 IAudioClock : public IUnknown 930 { 931 virtual HRESULT STDMETHODCALLTYPE GetFrequency( 932 UINT64 *pu64Frequency) = 0; 933 934 virtual HRESULT STDMETHODCALLTYPE GetPosition( 935 UINT64 *pu64Position, 936 UINT64 *pu64QPCPosition) = 0; 937 938 virtual HRESULT STDMETHODCALLTYPE GetCharacteristics( 939 DWORD *pdwCharacteristics) = 0; 940 941 }; 942 #ifdef __CRT_UUID_DECL 943 __CRT_UUID_DECL(IAudioClock, 0xcd63314f, 0x3fba, 0x4a1b, 0x81,0x2c, 0xef,0x96,0x35,0x87,0x28,0xe7) 944 #endif 945 #else 946 typedef struct IAudioClockVtbl { 947 BEGIN_INTERFACE 948 949 /*** IUnknown methods ***/ 950 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 951 IAudioClock* This, 952 REFIID riid, 953 void **ppvObject); 954 955 ULONG (STDMETHODCALLTYPE *AddRef)( 956 IAudioClock* This); 957 958 ULONG (STDMETHODCALLTYPE *Release)( 959 IAudioClock* This); 960 961 /*** IAudioClock methods ***/ 962 HRESULT (STDMETHODCALLTYPE *GetFrequency)( 963 IAudioClock* This, 964 UINT64 *pu64Frequency); 965 966 HRESULT (STDMETHODCALLTYPE *GetPosition)( 967 IAudioClock* This, 968 UINT64 *pu64Position, 969 UINT64 *pu64QPCPosition); 970 971 HRESULT (STDMETHODCALLTYPE *GetCharacteristics)( 972 IAudioClock* This, 973 DWORD *pdwCharacteristics); 974 975 END_INTERFACE 976 } IAudioClockVtbl; 977 interface IAudioClock { 978 CONST_VTBL IAudioClockVtbl* lpVtbl; 979 }; 980 981 #ifdef COBJMACROS 982 #ifndef WIDL_C_INLINE_WRAPPERS 983 /*** IUnknown methods ***/ 984 #define IAudioClock_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 985 #define IAudioClock_AddRef(This) (This)->lpVtbl->AddRef(This) 986 #define IAudioClock_Release(This) (This)->lpVtbl->Release(This) 987 /*** IAudioClock methods ***/ 988 #define IAudioClock_GetFrequency(This,pu64Frequency) (This)->lpVtbl->GetFrequency(This,pu64Frequency) 989 #define IAudioClock_GetPosition(This,pu64Position,pu64QPCPosition) (This)->lpVtbl->GetPosition(This,pu64Position,pu64QPCPosition) 990 #define IAudioClock_GetCharacteristics(This,pdwCharacteristics) (This)->lpVtbl->GetCharacteristics(This,pdwCharacteristics) 991 #else 992 /*** IUnknown methods ***/ 993 static FORCEINLINE HRESULT IAudioClock_QueryInterface(IAudioClock* This,REFIID riid,void **ppvObject) { 994 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 995 } 996 static FORCEINLINE ULONG IAudioClock_AddRef(IAudioClock* This) { 997 return This->lpVtbl->AddRef(This); 998 } 999 static FORCEINLINE ULONG IAudioClock_Release(IAudioClock* This) { 1000 return This->lpVtbl->Release(This); 1001 } 1002 /*** IAudioClock methods ***/ 1003 static FORCEINLINE HRESULT IAudioClock_GetFrequency(IAudioClock* This,UINT64 *pu64Frequency) { 1004 return This->lpVtbl->GetFrequency(This,pu64Frequency); 1005 } 1006 static FORCEINLINE HRESULT IAudioClock_GetPosition(IAudioClock* This,UINT64 *pu64Position,UINT64 *pu64QPCPosition) { 1007 return This->lpVtbl->GetPosition(This,pu64Position,pu64QPCPosition); 1008 } 1009 static FORCEINLINE HRESULT IAudioClock_GetCharacteristics(IAudioClock* This,DWORD *pdwCharacteristics) { 1010 return This->lpVtbl->GetCharacteristics(This,pdwCharacteristics); 1011 } 1012 #endif 1013 #endif 1014 1015 #endif 1016 1017 HRESULT STDMETHODCALLTYPE IAudioClock_GetFrequency_Proxy( 1018 IAudioClock* This, 1019 UINT64 *pu64Frequency); 1020 void __RPC_STUB IAudioClock_GetFrequency_Stub( 1021 IRpcStubBuffer* This, 1022 IRpcChannelBuffer* pRpcChannelBuffer, 1023 PRPC_MESSAGE pRpcMessage, 1024 DWORD* pdwStubPhase); 1025 HRESULT STDMETHODCALLTYPE IAudioClock_GetPosition_Proxy( 1026 IAudioClock* This, 1027 UINT64 *pu64Position, 1028 UINT64 *pu64QPCPosition); 1029 void __RPC_STUB IAudioClock_GetPosition_Stub( 1030 IRpcStubBuffer* This, 1031 IRpcChannelBuffer* pRpcChannelBuffer, 1032 PRPC_MESSAGE pRpcMessage, 1033 DWORD* pdwStubPhase); 1034 HRESULT STDMETHODCALLTYPE IAudioClock_GetCharacteristics_Proxy( 1035 IAudioClock* This, 1036 DWORD *pdwCharacteristics); 1037 void __RPC_STUB IAudioClock_GetCharacteristics_Stub( 1038 IRpcStubBuffer* This, 1039 IRpcChannelBuffer* pRpcChannelBuffer, 1040 PRPC_MESSAGE pRpcMessage, 1041 DWORD* pdwStubPhase); 1042 1043 #endif /* __IAudioClock_INTERFACE_DEFINED__ */ 1044 1045 #endif 1046 1047 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 1048 /***************************************************************************** 1049 * IAudioClock2 interface 1050 */ 1051 #ifndef __IAudioClock2_INTERFACE_DEFINED__ 1052 #define __IAudioClock2_INTERFACE_DEFINED__ 1053 1054 DEFINE_GUID(IID_IAudioClock2, 0x6f49ff73, 0x6727, 0x49ac, 0xa0,0x08, 0xd9,0x8c,0xf5,0xe7,0x00,0x48); 1055 #if defined(__cplusplus) && !defined(CINTERFACE) 1056 MIDL_INTERFACE("6f49ff73-6727-49ac-a008-d98cf5e70048") 1057 IAudioClock2 : public IUnknown 1058 { 1059 virtual HRESULT STDMETHODCALLTYPE GetDevicePosition( 1060 UINT64 *DevicePosition, 1061 UINT64 *QPCPosition) = 0; 1062 1063 }; 1064 #ifdef __CRT_UUID_DECL 1065 __CRT_UUID_DECL(IAudioClock2, 0x6f49ff73, 0x6727, 0x49ac, 0xa0,0x08, 0xd9,0x8c,0xf5,0xe7,0x00,0x48) 1066 #endif 1067 #else 1068 typedef struct IAudioClock2Vtbl { 1069 BEGIN_INTERFACE 1070 1071 /*** IUnknown methods ***/ 1072 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 1073 IAudioClock2* This, 1074 REFIID riid, 1075 void **ppvObject); 1076 1077 ULONG (STDMETHODCALLTYPE *AddRef)( 1078 IAudioClock2* This); 1079 1080 ULONG (STDMETHODCALLTYPE *Release)( 1081 IAudioClock2* This); 1082 1083 /*** IAudioClock2 methods ***/ 1084 HRESULT (STDMETHODCALLTYPE *GetDevicePosition)( 1085 IAudioClock2* This, 1086 UINT64 *DevicePosition, 1087 UINT64 *QPCPosition); 1088 1089 END_INTERFACE 1090 } IAudioClock2Vtbl; 1091 interface IAudioClock2 { 1092 CONST_VTBL IAudioClock2Vtbl* lpVtbl; 1093 }; 1094 1095 #ifdef COBJMACROS 1096 #ifndef WIDL_C_INLINE_WRAPPERS 1097 /*** IUnknown methods ***/ 1098 #define IAudioClock2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 1099 #define IAudioClock2_AddRef(This) (This)->lpVtbl->AddRef(This) 1100 #define IAudioClock2_Release(This) (This)->lpVtbl->Release(This) 1101 /*** IAudioClock2 methods ***/ 1102 #define IAudioClock2_GetDevicePosition(This,DevicePosition,QPCPosition) (This)->lpVtbl->GetDevicePosition(This,DevicePosition,QPCPosition) 1103 #else 1104 /*** IUnknown methods ***/ 1105 static FORCEINLINE HRESULT IAudioClock2_QueryInterface(IAudioClock2* This,REFIID riid,void **ppvObject) { 1106 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 1107 } 1108 static FORCEINLINE ULONG IAudioClock2_AddRef(IAudioClock2* This) { 1109 return This->lpVtbl->AddRef(This); 1110 } 1111 static FORCEINLINE ULONG IAudioClock2_Release(IAudioClock2* This) { 1112 return This->lpVtbl->Release(This); 1113 } 1114 /*** IAudioClock2 methods ***/ 1115 static FORCEINLINE HRESULT IAudioClock2_GetDevicePosition(IAudioClock2* This,UINT64 *DevicePosition,UINT64 *QPCPosition) { 1116 return This->lpVtbl->GetDevicePosition(This,DevicePosition,QPCPosition); 1117 } 1118 #endif 1119 #endif 1120 1121 #endif 1122 1123 HRESULT STDMETHODCALLTYPE IAudioClock2_GetDevicePosition_Proxy( 1124 IAudioClock2* This, 1125 UINT64 *DevicePosition, 1126 UINT64 *QPCPosition); 1127 void __RPC_STUB IAudioClock2_GetDevicePosition_Stub( 1128 IRpcStubBuffer* This, 1129 IRpcChannelBuffer* pRpcChannelBuffer, 1130 PRPC_MESSAGE pRpcMessage, 1131 DWORD* pdwStubPhase); 1132 1133 #endif /* __IAudioClock2_INTERFACE_DEFINED__ */ 1134 1135 1136 /***************************************************************************** 1137 * IAudioClockAdjustment interface 1138 */ 1139 #ifndef __IAudioClockAdjustment_INTERFACE_DEFINED__ 1140 #define __IAudioClockAdjustment_INTERFACE_DEFINED__ 1141 1142 DEFINE_GUID(IID_IAudioClockAdjustment, 0xf6e4c0a0, 0x46d9, 0x4fb8, 0xbe,0x21, 0x57,0xa3,0xef,0x2b,0x62,0x6c); 1143 #if defined(__cplusplus) && !defined(CINTERFACE) 1144 MIDL_INTERFACE("f6e4c0a0-46d9-4fb8-be21-57a3ef2b626c") 1145 IAudioClockAdjustment : public IUnknown 1146 { 1147 virtual HRESULT STDMETHODCALLTYPE SetSampleRate( 1148 float flSampleRate) = 0; 1149 1150 }; 1151 #ifdef __CRT_UUID_DECL 1152 __CRT_UUID_DECL(IAudioClockAdjustment, 0xf6e4c0a0, 0x46d9, 0x4fb8, 0xbe,0x21, 0x57,0xa3,0xef,0x2b,0x62,0x6c) 1153 #endif 1154 #else 1155 typedef struct IAudioClockAdjustmentVtbl { 1156 BEGIN_INTERFACE 1157 1158 /*** IUnknown methods ***/ 1159 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 1160 IAudioClockAdjustment* This, 1161 REFIID riid, 1162 void **ppvObject); 1163 1164 ULONG (STDMETHODCALLTYPE *AddRef)( 1165 IAudioClockAdjustment* This); 1166 1167 ULONG (STDMETHODCALLTYPE *Release)( 1168 IAudioClockAdjustment* This); 1169 1170 /*** IAudioClockAdjustment methods ***/ 1171 HRESULT (STDMETHODCALLTYPE *SetSampleRate)( 1172 IAudioClockAdjustment* This, 1173 float flSampleRate); 1174 1175 END_INTERFACE 1176 } IAudioClockAdjustmentVtbl; 1177 interface IAudioClockAdjustment { 1178 CONST_VTBL IAudioClockAdjustmentVtbl* lpVtbl; 1179 }; 1180 1181 #ifdef COBJMACROS 1182 #ifndef WIDL_C_INLINE_WRAPPERS 1183 /*** IUnknown methods ***/ 1184 #define IAudioClockAdjustment_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 1185 #define IAudioClockAdjustment_AddRef(This) (This)->lpVtbl->AddRef(This) 1186 #define IAudioClockAdjustment_Release(This) (This)->lpVtbl->Release(This) 1187 /*** IAudioClockAdjustment methods ***/ 1188 #define IAudioClockAdjustment_SetSampleRate(This,flSampleRate) (This)->lpVtbl->SetSampleRate(This,flSampleRate) 1189 #else 1190 /*** IUnknown methods ***/ 1191 static FORCEINLINE HRESULT IAudioClockAdjustment_QueryInterface(IAudioClockAdjustment* This,REFIID riid,void **ppvObject) { 1192 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 1193 } 1194 static FORCEINLINE ULONG IAudioClockAdjustment_AddRef(IAudioClockAdjustment* This) { 1195 return This->lpVtbl->AddRef(This); 1196 } 1197 static FORCEINLINE ULONG IAudioClockAdjustment_Release(IAudioClockAdjustment* This) { 1198 return This->lpVtbl->Release(This); 1199 } 1200 /*** IAudioClockAdjustment methods ***/ 1201 static FORCEINLINE HRESULT IAudioClockAdjustment_SetSampleRate(IAudioClockAdjustment* This,float flSampleRate) { 1202 return This->lpVtbl->SetSampleRate(This,flSampleRate); 1203 } 1204 #endif 1205 #endif 1206 1207 #endif 1208 1209 HRESULT STDMETHODCALLTYPE IAudioClockAdjustment_SetSampleRate_Proxy( 1210 IAudioClockAdjustment* This, 1211 float flSampleRate); 1212 void __RPC_STUB IAudioClockAdjustment_SetSampleRate_Stub( 1213 IRpcStubBuffer* This, 1214 IRpcChannelBuffer* pRpcChannelBuffer, 1215 PRPC_MESSAGE pRpcMessage, 1216 DWORD* pdwStubPhase); 1217 1218 #endif /* __IAudioClockAdjustment_INTERFACE_DEFINED__ */ 1219 1220 #endif 1221 1222 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 1223 /***************************************************************************** 1224 * ISimpleAudioVolume interface 1225 */ 1226 #ifndef __ISimpleAudioVolume_INTERFACE_DEFINED__ 1227 #define __ISimpleAudioVolume_INTERFACE_DEFINED__ 1228 1229 DEFINE_GUID(IID_ISimpleAudioVolume, 0x87ce5498, 0x68d6, 0x44e5, 0x92,0x15, 0x6d,0xa4,0x7e,0xf8,0x83,0xd8); 1230 #if defined(__cplusplus) && !defined(CINTERFACE) 1231 MIDL_INTERFACE("87ce5498-68d6-44e5-9215-6da47ef883d8") 1232 ISimpleAudioVolume : public IUnknown 1233 { 1234 virtual HRESULT STDMETHODCALLTYPE SetMasterVolume( 1235 float fLevel, 1236 LPCGUID EventContext) = 0; 1237 1238 virtual HRESULT STDMETHODCALLTYPE GetMasterVolume( 1239 float *pfLevel) = 0; 1240 1241 virtual HRESULT STDMETHODCALLTYPE SetMute( 1242 const WINBOOL bMute, 1243 LPCGUID EventContext) = 0; 1244 1245 virtual HRESULT STDMETHODCALLTYPE GetMute( 1246 WINBOOL *pbMute) = 0; 1247 1248 }; 1249 #ifdef __CRT_UUID_DECL 1250 __CRT_UUID_DECL(ISimpleAudioVolume, 0x87ce5498, 0x68d6, 0x44e5, 0x92,0x15, 0x6d,0xa4,0x7e,0xf8,0x83,0xd8) 1251 #endif 1252 #else 1253 typedef struct ISimpleAudioVolumeVtbl { 1254 BEGIN_INTERFACE 1255 1256 /*** IUnknown methods ***/ 1257 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 1258 ISimpleAudioVolume* This, 1259 REFIID riid, 1260 void **ppvObject); 1261 1262 ULONG (STDMETHODCALLTYPE *AddRef)( 1263 ISimpleAudioVolume* This); 1264 1265 ULONG (STDMETHODCALLTYPE *Release)( 1266 ISimpleAudioVolume* This); 1267 1268 /*** ISimpleAudioVolume methods ***/ 1269 HRESULT (STDMETHODCALLTYPE *SetMasterVolume)( 1270 ISimpleAudioVolume* This, 1271 float fLevel, 1272 LPCGUID EventContext); 1273 1274 HRESULT (STDMETHODCALLTYPE *GetMasterVolume)( 1275 ISimpleAudioVolume* This, 1276 float *pfLevel); 1277 1278 HRESULT (STDMETHODCALLTYPE *SetMute)( 1279 ISimpleAudioVolume* This, 1280 const WINBOOL bMute, 1281 LPCGUID EventContext); 1282 1283 HRESULT (STDMETHODCALLTYPE *GetMute)( 1284 ISimpleAudioVolume* This, 1285 WINBOOL *pbMute); 1286 1287 END_INTERFACE 1288 } ISimpleAudioVolumeVtbl; 1289 interface ISimpleAudioVolume { 1290 CONST_VTBL ISimpleAudioVolumeVtbl* lpVtbl; 1291 }; 1292 1293 #ifdef COBJMACROS 1294 #ifndef WIDL_C_INLINE_WRAPPERS 1295 /*** IUnknown methods ***/ 1296 #define ISimpleAudioVolume_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 1297 #define ISimpleAudioVolume_AddRef(This) (This)->lpVtbl->AddRef(This) 1298 #define ISimpleAudioVolume_Release(This) (This)->lpVtbl->Release(This) 1299 /*** ISimpleAudioVolume methods ***/ 1300 #define ISimpleAudioVolume_SetMasterVolume(This,fLevel,EventContext) (This)->lpVtbl->SetMasterVolume(This,fLevel,EventContext) 1301 #define ISimpleAudioVolume_GetMasterVolume(This,pfLevel) (This)->lpVtbl->GetMasterVolume(This,pfLevel) 1302 #define ISimpleAudioVolume_SetMute(This,bMute,EventContext) (This)->lpVtbl->SetMute(This,bMute,EventContext) 1303 #define ISimpleAudioVolume_GetMute(This,pbMute) (This)->lpVtbl->GetMute(This,pbMute) 1304 #else 1305 /*** IUnknown methods ***/ 1306 static FORCEINLINE HRESULT ISimpleAudioVolume_QueryInterface(ISimpleAudioVolume* This,REFIID riid,void **ppvObject) { 1307 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 1308 } 1309 static FORCEINLINE ULONG ISimpleAudioVolume_AddRef(ISimpleAudioVolume* This) { 1310 return This->lpVtbl->AddRef(This); 1311 } 1312 static FORCEINLINE ULONG ISimpleAudioVolume_Release(ISimpleAudioVolume* This) { 1313 return This->lpVtbl->Release(This); 1314 } 1315 /*** ISimpleAudioVolume methods ***/ 1316 static FORCEINLINE HRESULT ISimpleAudioVolume_SetMasterVolume(ISimpleAudioVolume* This,float fLevel,LPCGUID EventContext) { 1317 return This->lpVtbl->SetMasterVolume(This,fLevel,EventContext); 1318 } 1319 static FORCEINLINE HRESULT ISimpleAudioVolume_GetMasterVolume(ISimpleAudioVolume* This,float *pfLevel) { 1320 return This->lpVtbl->GetMasterVolume(This,pfLevel); 1321 } 1322 static FORCEINLINE HRESULT ISimpleAudioVolume_SetMute(ISimpleAudioVolume* This,const WINBOOL bMute,LPCGUID EventContext) { 1323 return This->lpVtbl->SetMute(This,bMute,EventContext); 1324 } 1325 static FORCEINLINE HRESULT ISimpleAudioVolume_GetMute(ISimpleAudioVolume* This,WINBOOL *pbMute) { 1326 return This->lpVtbl->GetMute(This,pbMute); 1327 } 1328 #endif 1329 #endif 1330 1331 #endif 1332 1333 HRESULT STDMETHODCALLTYPE ISimpleAudioVolume_SetMasterVolume_Proxy( 1334 ISimpleAudioVolume* This, 1335 float fLevel, 1336 LPCGUID EventContext); 1337 void __RPC_STUB ISimpleAudioVolume_SetMasterVolume_Stub( 1338 IRpcStubBuffer* This, 1339 IRpcChannelBuffer* pRpcChannelBuffer, 1340 PRPC_MESSAGE pRpcMessage, 1341 DWORD* pdwStubPhase); 1342 HRESULT STDMETHODCALLTYPE ISimpleAudioVolume_GetMasterVolume_Proxy( 1343 ISimpleAudioVolume* This, 1344 float *pfLevel); 1345 void __RPC_STUB ISimpleAudioVolume_GetMasterVolume_Stub( 1346 IRpcStubBuffer* This, 1347 IRpcChannelBuffer* pRpcChannelBuffer, 1348 PRPC_MESSAGE pRpcMessage, 1349 DWORD* pdwStubPhase); 1350 HRESULT STDMETHODCALLTYPE ISimpleAudioVolume_SetMute_Proxy( 1351 ISimpleAudioVolume* This, 1352 const WINBOOL bMute, 1353 LPCGUID EventContext); 1354 void __RPC_STUB ISimpleAudioVolume_SetMute_Stub( 1355 IRpcStubBuffer* This, 1356 IRpcChannelBuffer* pRpcChannelBuffer, 1357 PRPC_MESSAGE pRpcMessage, 1358 DWORD* pdwStubPhase); 1359 HRESULT STDMETHODCALLTYPE ISimpleAudioVolume_GetMute_Proxy( 1360 ISimpleAudioVolume* This, 1361 WINBOOL *pbMute); 1362 void __RPC_STUB ISimpleAudioVolume_GetMute_Stub( 1363 IRpcStubBuffer* This, 1364 IRpcChannelBuffer* pRpcChannelBuffer, 1365 PRPC_MESSAGE pRpcMessage, 1366 DWORD* pdwStubPhase); 1367 1368 #endif /* __ISimpleAudioVolume_INTERFACE_DEFINED__ */ 1369 1370 #endif 1371 1372 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 1373 /***************************************************************************** 1374 * IAudioStreamVolume interface 1375 */ 1376 #ifndef __IAudioStreamVolume_INTERFACE_DEFINED__ 1377 #define __IAudioStreamVolume_INTERFACE_DEFINED__ 1378 1379 DEFINE_GUID(IID_IAudioStreamVolume, 0x93014887, 0x242d, 0x4068, 0x8a,0x15, 0xcf,0x5e,0x93,0xb9,0x0f,0xe3); 1380 #if defined(__cplusplus) && !defined(CINTERFACE) 1381 MIDL_INTERFACE("93014887-242d-4068-8a15-cf5e93b90fe3") 1382 IAudioStreamVolume : public IUnknown 1383 { 1384 virtual HRESULT STDMETHODCALLTYPE GetChannelCount( 1385 UINT32 *pdwCount) = 0; 1386 1387 virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( 1388 UINT32 dwIndex, 1389 const float fLevel) = 0; 1390 1391 virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( 1392 UINT32 dwIndex, 1393 float *pfLevel) = 0; 1394 1395 virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( 1396 UINT32 dwCount, 1397 const float *pfVolumes) = 0; 1398 1399 virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( 1400 UINT32 dwCount, 1401 float *pfVolumes) = 0; 1402 1403 }; 1404 #ifdef __CRT_UUID_DECL 1405 __CRT_UUID_DECL(IAudioStreamVolume, 0x93014887, 0x242d, 0x4068, 0x8a,0x15, 0xcf,0x5e,0x93,0xb9,0x0f,0xe3) 1406 #endif 1407 #else 1408 typedef struct IAudioStreamVolumeVtbl { 1409 BEGIN_INTERFACE 1410 1411 /*** IUnknown methods ***/ 1412 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 1413 IAudioStreamVolume* This, 1414 REFIID riid, 1415 void **ppvObject); 1416 1417 ULONG (STDMETHODCALLTYPE *AddRef)( 1418 IAudioStreamVolume* This); 1419 1420 ULONG (STDMETHODCALLTYPE *Release)( 1421 IAudioStreamVolume* This); 1422 1423 /*** IAudioStreamVolume methods ***/ 1424 HRESULT (STDMETHODCALLTYPE *GetChannelCount)( 1425 IAudioStreamVolume* This, 1426 UINT32 *pdwCount); 1427 1428 HRESULT (STDMETHODCALLTYPE *SetChannelVolume)( 1429 IAudioStreamVolume* This, 1430 UINT32 dwIndex, 1431 const float fLevel); 1432 1433 HRESULT (STDMETHODCALLTYPE *GetChannelVolume)( 1434 IAudioStreamVolume* This, 1435 UINT32 dwIndex, 1436 float *pfLevel); 1437 1438 HRESULT (STDMETHODCALLTYPE *SetAllVolumes)( 1439 IAudioStreamVolume* This, 1440 UINT32 dwCount, 1441 const float *pfVolumes); 1442 1443 HRESULT (STDMETHODCALLTYPE *GetAllVolumes)( 1444 IAudioStreamVolume* This, 1445 UINT32 dwCount, 1446 float *pfVolumes); 1447 1448 END_INTERFACE 1449 } IAudioStreamVolumeVtbl; 1450 interface IAudioStreamVolume { 1451 CONST_VTBL IAudioStreamVolumeVtbl* lpVtbl; 1452 }; 1453 1454 #ifdef COBJMACROS 1455 #ifndef WIDL_C_INLINE_WRAPPERS 1456 /*** IUnknown methods ***/ 1457 #define IAudioStreamVolume_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 1458 #define IAudioStreamVolume_AddRef(This) (This)->lpVtbl->AddRef(This) 1459 #define IAudioStreamVolume_Release(This) (This)->lpVtbl->Release(This) 1460 /*** IAudioStreamVolume methods ***/ 1461 #define IAudioStreamVolume_GetChannelCount(This,pdwCount) (This)->lpVtbl->GetChannelCount(This,pdwCount) 1462 #define IAudioStreamVolume_SetChannelVolume(This,dwIndex,fLevel) (This)->lpVtbl->SetChannelVolume(This,dwIndex,fLevel) 1463 #define IAudioStreamVolume_GetChannelVolume(This,dwIndex,pfLevel) (This)->lpVtbl->GetChannelVolume(This,dwIndex,pfLevel) 1464 #define IAudioStreamVolume_SetAllVolumes(This,dwCount,pfVolumes) (This)->lpVtbl->SetAllVolumes(This,dwCount,pfVolumes) 1465 #define IAudioStreamVolume_GetAllVolumes(This,dwCount,pfVolumes) (This)->lpVtbl->GetAllVolumes(This,dwCount,pfVolumes) 1466 #else 1467 /*** IUnknown methods ***/ 1468 static FORCEINLINE HRESULT IAudioStreamVolume_QueryInterface(IAudioStreamVolume* This,REFIID riid,void **ppvObject) { 1469 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 1470 } 1471 static FORCEINLINE ULONG IAudioStreamVolume_AddRef(IAudioStreamVolume* This) { 1472 return This->lpVtbl->AddRef(This); 1473 } 1474 static FORCEINLINE ULONG IAudioStreamVolume_Release(IAudioStreamVolume* This) { 1475 return This->lpVtbl->Release(This); 1476 } 1477 /*** IAudioStreamVolume methods ***/ 1478 static FORCEINLINE HRESULT IAudioStreamVolume_GetChannelCount(IAudioStreamVolume* This,UINT32 *pdwCount) { 1479 return This->lpVtbl->GetChannelCount(This,pdwCount); 1480 } 1481 static FORCEINLINE HRESULT IAudioStreamVolume_SetChannelVolume(IAudioStreamVolume* This,UINT32 dwIndex,const float fLevel) { 1482 return This->lpVtbl->SetChannelVolume(This,dwIndex,fLevel); 1483 } 1484 static FORCEINLINE HRESULT IAudioStreamVolume_GetChannelVolume(IAudioStreamVolume* This,UINT32 dwIndex,float *pfLevel) { 1485 return This->lpVtbl->GetChannelVolume(This,dwIndex,pfLevel); 1486 } 1487 static FORCEINLINE HRESULT IAudioStreamVolume_SetAllVolumes(IAudioStreamVolume* This,UINT32 dwCount,const float *pfVolumes) { 1488 return This->lpVtbl->SetAllVolumes(This,dwCount,pfVolumes); 1489 } 1490 static FORCEINLINE HRESULT IAudioStreamVolume_GetAllVolumes(IAudioStreamVolume* This,UINT32 dwCount,float *pfVolumes) { 1491 return This->lpVtbl->GetAllVolumes(This,dwCount,pfVolumes); 1492 } 1493 #endif 1494 #endif 1495 1496 #endif 1497 1498 HRESULT STDMETHODCALLTYPE IAudioStreamVolume_GetChannelCount_Proxy( 1499 IAudioStreamVolume* This, 1500 UINT32 *pdwCount); 1501 void __RPC_STUB IAudioStreamVolume_GetChannelCount_Stub( 1502 IRpcStubBuffer* This, 1503 IRpcChannelBuffer* pRpcChannelBuffer, 1504 PRPC_MESSAGE pRpcMessage, 1505 DWORD* pdwStubPhase); 1506 HRESULT STDMETHODCALLTYPE IAudioStreamVolume_SetChannelVolume_Proxy( 1507 IAudioStreamVolume* This, 1508 UINT32 dwIndex, 1509 const float fLevel); 1510 void __RPC_STUB IAudioStreamVolume_SetChannelVolume_Stub( 1511 IRpcStubBuffer* This, 1512 IRpcChannelBuffer* pRpcChannelBuffer, 1513 PRPC_MESSAGE pRpcMessage, 1514 DWORD* pdwStubPhase); 1515 HRESULT STDMETHODCALLTYPE IAudioStreamVolume_GetChannelVolume_Proxy( 1516 IAudioStreamVolume* This, 1517 UINT32 dwIndex, 1518 float *pfLevel); 1519 void __RPC_STUB IAudioStreamVolume_GetChannelVolume_Stub( 1520 IRpcStubBuffer* This, 1521 IRpcChannelBuffer* pRpcChannelBuffer, 1522 PRPC_MESSAGE pRpcMessage, 1523 DWORD* pdwStubPhase); 1524 HRESULT STDMETHODCALLTYPE IAudioStreamVolume_SetAllVolumes_Proxy( 1525 IAudioStreamVolume* This, 1526 UINT32 dwCount, 1527 const float *pfVolumes); 1528 void __RPC_STUB IAudioStreamVolume_SetAllVolumes_Stub( 1529 IRpcStubBuffer* This, 1530 IRpcChannelBuffer* pRpcChannelBuffer, 1531 PRPC_MESSAGE pRpcMessage, 1532 DWORD* pdwStubPhase); 1533 HRESULT STDMETHODCALLTYPE IAudioStreamVolume_GetAllVolumes_Proxy( 1534 IAudioStreamVolume* This, 1535 UINT32 dwCount, 1536 float *pfVolumes); 1537 void __RPC_STUB IAudioStreamVolume_GetAllVolumes_Stub( 1538 IRpcStubBuffer* This, 1539 IRpcChannelBuffer* pRpcChannelBuffer, 1540 PRPC_MESSAGE pRpcMessage, 1541 DWORD* pdwStubPhase); 1542 1543 #endif /* __IAudioStreamVolume_INTERFACE_DEFINED__ */ 1544 1545 1546 /***************************************************************************** 1547 * IChannelAudioVolume interface 1548 */ 1549 #ifndef __IChannelAudioVolume_INTERFACE_DEFINED__ 1550 #define __IChannelAudioVolume_INTERFACE_DEFINED__ 1551 1552 DEFINE_GUID(IID_IChannelAudioVolume, 0x1c158861, 0xb533, 0x4b30, 0xb1,0xcf, 0xe8,0x53,0xe5,0x1c,0x59,0xb8); 1553 #if defined(__cplusplus) && !defined(CINTERFACE) 1554 MIDL_INTERFACE("1c158861-b533-4b30-b1cf-e853e51c59b8") 1555 IChannelAudioVolume : public IUnknown 1556 { 1557 virtual HRESULT STDMETHODCALLTYPE GetChannelCount( 1558 UINT32 *pdwCount) = 0; 1559 1560 virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( 1561 UINT32 dwIndex, 1562 const float fLevel, 1563 LPCGUID EventContext) = 0; 1564 1565 virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( 1566 UINT32 dwIndex, 1567 float *pfLevel) = 0; 1568 1569 virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( 1570 UINT32 dwCount, 1571 const float *pfVolumes, 1572 LPCGUID EventContext) = 0; 1573 1574 virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( 1575 UINT32 dwCount, 1576 float *pfVolumes) = 0; 1577 1578 }; 1579 #ifdef __CRT_UUID_DECL 1580 __CRT_UUID_DECL(IChannelAudioVolume, 0x1c158861, 0xb533, 0x4b30, 0xb1,0xcf, 0xe8,0x53,0xe5,0x1c,0x59,0xb8) 1581 #endif 1582 #else 1583 typedef struct IChannelAudioVolumeVtbl { 1584 BEGIN_INTERFACE 1585 1586 /*** IUnknown methods ***/ 1587 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 1588 IChannelAudioVolume* This, 1589 REFIID riid, 1590 void **ppvObject); 1591 1592 ULONG (STDMETHODCALLTYPE *AddRef)( 1593 IChannelAudioVolume* This); 1594 1595 ULONG (STDMETHODCALLTYPE *Release)( 1596 IChannelAudioVolume* This); 1597 1598 /*** IChannelAudioVolume methods ***/ 1599 HRESULT (STDMETHODCALLTYPE *GetChannelCount)( 1600 IChannelAudioVolume* This, 1601 UINT32 *pdwCount); 1602 1603 HRESULT (STDMETHODCALLTYPE *SetChannelVolume)( 1604 IChannelAudioVolume* This, 1605 UINT32 dwIndex, 1606 const float fLevel, 1607 LPCGUID EventContext); 1608 1609 HRESULT (STDMETHODCALLTYPE *GetChannelVolume)( 1610 IChannelAudioVolume* This, 1611 UINT32 dwIndex, 1612 float *pfLevel); 1613 1614 HRESULT (STDMETHODCALLTYPE *SetAllVolumes)( 1615 IChannelAudioVolume* This, 1616 UINT32 dwCount, 1617 const float *pfVolumes, 1618 LPCGUID EventContext); 1619 1620 HRESULT (STDMETHODCALLTYPE *GetAllVolumes)( 1621 IChannelAudioVolume* This, 1622 UINT32 dwCount, 1623 float *pfVolumes); 1624 1625 END_INTERFACE 1626 } IChannelAudioVolumeVtbl; 1627 interface IChannelAudioVolume { 1628 CONST_VTBL IChannelAudioVolumeVtbl* lpVtbl; 1629 }; 1630 1631 #ifdef COBJMACROS 1632 #ifndef WIDL_C_INLINE_WRAPPERS 1633 /*** IUnknown methods ***/ 1634 #define IChannelAudioVolume_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 1635 #define IChannelAudioVolume_AddRef(This) (This)->lpVtbl->AddRef(This) 1636 #define IChannelAudioVolume_Release(This) (This)->lpVtbl->Release(This) 1637 /*** IChannelAudioVolume methods ***/ 1638 #define IChannelAudioVolume_GetChannelCount(This,pdwCount) (This)->lpVtbl->GetChannelCount(This,pdwCount) 1639 #define IChannelAudioVolume_SetChannelVolume(This,dwIndex,fLevel,EventContext) (This)->lpVtbl->SetChannelVolume(This,dwIndex,fLevel,EventContext) 1640 #define IChannelAudioVolume_GetChannelVolume(This,dwIndex,pfLevel) (This)->lpVtbl->GetChannelVolume(This,dwIndex,pfLevel) 1641 #define IChannelAudioVolume_SetAllVolumes(This,dwCount,pfVolumes,EventContext) (This)->lpVtbl->SetAllVolumes(This,dwCount,pfVolumes,EventContext) 1642 #define IChannelAudioVolume_GetAllVolumes(This,dwCount,pfVolumes) (This)->lpVtbl->GetAllVolumes(This,dwCount,pfVolumes) 1643 #else 1644 /*** IUnknown methods ***/ 1645 static FORCEINLINE HRESULT IChannelAudioVolume_QueryInterface(IChannelAudioVolume* This,REFIID riid,void **ppvObject) { 1646 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 1647 } 1648 static FORCEINLINE ULONG IChannelAudioVolume_AddRef(IChannelAudioVolume* This) { 1649 return This->lpVtbl->AddRef(This); 1650 } 1651 static FORCEINLINE ULONG IChannelAudioVolume_Release(IChannelAudioVolume* This) { 1652 return This->lpVtbl->Release(This); 1653 } 1654 /*** IChannelAudioVolume methods ***/ 1655 static FORCEINLINE HRESULT IChannelAudioVolume_GetChannelCount(IChannelAudioVolume* This,UINT32 *pdwCount) { 1656 return This->lpVtbl->GetChannelCount(This,pdwCount); 1657 } 1658 static FORCEINLINE HRESULT IChannelAudioVolume_SetChannelVolume(IChannelAudioVolume* This,UINT32 dwIndex,const float fLevel,LPCGUID EventContext) { 1659 return This->lpVtbl->SetChannelVolume(This,dwIndex,fLevel,EventContext); 1660 } 1661 static FORCEINLINE HRESULT IChannelAudioVolume_GetChannelVolume(IChannelAudioVolume* This,UINT32 dwIndex,float *pfLevel) { 1662 return This->lpVtbl->GetChannelVolume(This,dwIndex,pfLevel); 1663 } 1664 static FORCEINLINE HRESULT IChannelAudioVolume_SetAllVolumes(IChannelAudioVolume* This,UINT32 dwCount,const float *pfVolumes,LPCGUID EventContext) { 1665 return This->lpVtbl->SetAllVolumes(This,dwCount,pfVolumes,EventContext); 1666 } 1667 static FORCEINLINE HRESULT IChannelAudioVolume_GetAllVolumes(IChannelAudioVolume* This,UINT32 dwCount,float *pfVolumes) { 1668 return This->lpVtbl->GetAllVolumes(This,dwCount,pfVolumes); 1669 } 1670 #endif 1671 #endif 1672 1673 #endif 1674 1675 HRESULT STDMETHODCALLTYPE IChannelAudioVolume_GetChannelCount_Proxy( 1676 IChannelAudioVolume* This, 1677 UINT32 *pdwCount); 1678 void __RPC_STUB IChannelAudioVolume_GetChannelCount_Stub( 1679 IRpcStubBuffer* This, 1680 IRpcChannelBuffer* pRpcChannelBuffer, 1681 PRPC_MESSAGE pRpcMessage, 1682 DWORD* pdwStubPhase); 1683 HRESULT STDMETHODCALLTYPE IChannelAudioVolume_SetChannelVolume_Proxy( 1684 IChannelAudioVolume* This, 1685 UINT32 dwIndex, 1686 const float fLevel, 1687 LPCGUID EventContext); 1688 void __RPC_STUB IChannelAudioVolume_SetChannelVolume_Stub( 1689 IRpcStubBuffer* This, 1690 IRpcChannelBuffer* pRpcChannelBuffer, 1691 PRPC_MESSAGE pRpcMessage, 1692 DWORD* pdwStubPhase); 1693 HRESULT STDMETHODCALLTYPE IChannelAudioVolume_GetChannelVolume_Proxy( 1694 IChannelAudioVolume* This, 1695 UINT32 dwIndex, 1696 float *pfLevel); 1697 void __RPC_STUB IChannelAudioVolume_GetChannelVolume_Stub( 1698 IRpcStubBuffer* This, 1699 IRpcChannelBuffer* pRpcChannelBuffer, 1700 PRPC_MESSAGE pRpcMessage, 1701 DWORD* pdwStubPhase); 1702 HRESULT STDMETHODCALLTYPE IChannelAudioVolume_SetAllVolumes_Proxy( 1703 IChannelAudioVolume* This, 1704 UINT32 dwCount, 1705 const float *pfVolumes, 1706 LPCGUID EventContext); 1707 void __RPC_STUB IChannelAudioVolume_SetAllVolumes_Stub( 1708 IRpcStubBuffer* This, 1709 IRpcChannelBuffer* pRpcChannelBuffer, 1710 PRPC_MESSAGE pRpcMessage, 1711 DWORD* pdwStubPhase); 1712 HRESULT STDMETHODCALLTYPE IChannelAudioVolume_GetAllVolumes_Proxy( 1713 IChannelAudioVolume* This, 1714 UINT32 dwCount, 1715 float *pfVolumes); 1716 void __RPC_STUB IChannelAudioVolume_GetAllVolumes_Stub( 1717 IRpcStubBuffer* This, 1718 IRpcChannelBuffer* pRpcChannelBuffer, 1719 PRPC_MESSAGE pRpcMessage, 1720 DWORD* pdwStubPhase); 1721 1722 #endif /* __IChannelAudioVolume_INTERFACE_DEFINED__ */ 1723 1724 #endif 1725 1726 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 1727 #define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n) 1728 #define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n) 1729 1730 #define AUDCLNT_E_NOT_INITIALIZED AUDCLNT_ERR(0x1) 1731 #define AUDCLNT_E_ALREADY_INITIALIZED AUDCLNT_ERR(0x2) 1732 #define AUDCLNT_E_WRONG_ENDPOINT_TYPE AUDCLNT_ERR(0x3) 1733 #define AUDCLNT_E_DEVICE_INVALIDATED AUDCLNT_ERR(0x4) 1734 #define AUDCLNT_E_NOT_STOPPED AUDCLNT_ERR(0x5) 1735 #define AUDCLNT_E_BUFFER_TOO_LARGE AUDCLNT_ERR(0x6) 1736 #define AUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(0x7) 1737 #define AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_ERR(0x8) 1738 #define AUDCLNT_E_INVALID_SIZE AUDCLNT_ERR(0x9) 1739 #define AUDCLNT_E_DEVICE_IN_USE AUDCLNT_ERR(0xa) 1740 #define AUDCLNT_E_BUFFER_OPERATION_PENDING AUDCLNT_ERR(0xb) 1741 #define AUDCLNT_E_THREAD_NOT_REGISTERED AUDCLNT_ERR(0xc) 1742 #define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0xe) 1743 #define AUDCLNT_E_ENDPOINT_CREATE_FAILED AUDCLNT_ERR(0xf) 1744 #define AUDCLNT_E_SERVICE_NOT_RUNNING AUDCLNT_ERR(0x10) 1745 #define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED AUDCLNT_ERR(0x11) 1746 #define AUDCLNT_E_EXCLUSIVE_MODE_ONLY AUDCLNT_ERR(0x12) 1747 #define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x13) 1748 #define AUDCLNT_E_EVENTHANDLE_NOT_SET AUDCLNT_ERR(0x14) 1749 #define AUDCLNT_E_INCORRECT_BUFFER_SIZE AUDCLNT_ERR(0x15) 1750 #define AUDCLNT_E_BUFFER_SIZE_ERROR AUDCLNT_ERR(0x16) 1751 #define AUDCLNT_E_CPUUSAGE_EXCEEDED AUDCLNT_ERR(0x17) 1752 #define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x18) 1753 #define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x19) 1754 #define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x20) 1755 #define AUDCLNT_E_INVALID_STREAM_FLAG AUDCLNT_ERR(0x21) 1756 #define AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE AUDCLNT_ERR(0x22) 1757 #define AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES AUDCLNT_ERR(0x23) 1758 #define AUDCLNT_E_OFFLOAD_MODE_ONLY AUDCLNT_ERR(0x24) 1759 #define AUDCLNT_E_NONOFFLOAD_MODE_ONLY AUDCLNT_ERR(0x25) 1760 #define AUDCLNT_E_RESOURCES_INVALIDATED AUDCLNT_ERR(0x26) 1761 #define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x1) 1762 #define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x2) 1763 #define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x3) 1764 #endif 1765 /* Begin additional prototypes for all interfaces */ 1766 1767 1768 /* End additional prototypes */ 1769 1770 #ifdef __cplusplus 1771 } 1772 #endif 1773 1774 #endif /* __audioclient_h__ */ 1775