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