2 * Core Audio audio policy definitions
4 * Copyright 2009 Maarten Lankhorst
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 import
"audiosessiontypes.h";
26 import
"audioclient.idl";
28 interface IAudioSessionEvents
;
29 interface IAudioSessionControl
;
30 interface IAudioSessionControl2
;
31 interface IAudioSessionManager
;
32 interface IAudioVolumeDuckNotification
;
33 interface IAudioSessionNotification
;
34 interface IAudioSessionEnumerator
;
35 interface IAudioSessionManager2
;
37 typedef enum AudioSessionDisconnectReason
/*[local]*/
39 DisconnectReasonDeviceRemoval
= 0,
40 DisconnectReasonServerShutdown
,
41 DisconnectReasonFormatChanged
,
42 DisconnectReasonSessionLogoff
,
43 DisconnectReasonSessionDisconnected
,
44 DisconnectReasonExclusiveModeOverride
,
45 } AudioSessionDisconnectReason
;
49 uuid(24918acc
-64b3
-37c1
-8ca9
-74a66e9957a8
),
50 pointer_default(unique),
53 interface IAudioSessionEvents
: IUnknown
55 HRESULT OnDisplayNameChanged
(
56 [string,in] LPCWSTR NewDisplayName
,
57 [in] LPCGUID EventContext
59 HRESULT OnIconPathChanged
(
60 [string,in] LPCWSTR NewIconPath
,
61 [in] LPCGUID EventContext
63 HRESULT OnSimpleVolumeChanged
(
66 [in] LPCGUID EventContext
68 HRESULT OnChannelVolumeChanged
(
69 [in] DWORD ChannelCount
,
70 [size_is(ChannelCount
),in] float *NewChannelVolumeArray
,
71 [in] DWORD ChangedChannel
,
72 [in] LPCGUID EventContext
74 HRESULT OnGroupingParamChanged
(
75 [in] LPCGUID NewGroupingParam
,
76 [in] LPCGUID EventContext
78 HRESULT OnStateChanged
(
79 [in] AudioSessionState NewState
81 HRESULT OnSessionDisconnected
(
82 [in] AudioSessionDisconnectReason DisconnectReason
88 uuid(f4b1a599
-7266-4319-a8ca
-e70acb11e8cd
),
89 pointer_default(unique),
92 interface IAudioSessionControl
: IUnknown
95 [out] AudioSessionState
*pRetVal
97 HRESULT GetDisplayName
(
98 [string,out] LPWSTR
*pRetVal
100 HRESULT SetDisplayName
(
101 [string,in] LPCWSTR DisplayName
,
102 [unique,in] LPCGUID EventContext
105 [string,out] LPWSTR
*pRetVal
108 [string,in] LPCWSTR Value
,
109 [unique,in] LPCGUID EventContext
111 HRESULT GetGroupingParam
(
114 HRESULT SetGroupingParam
(
115 [in] LPCGUID Override
,
116 [unique,in] LPCGUID EventContext
118 HRESULT RegisterAudioSessionNotification
(
119 [in] IAudioSessionEvents
*NewNotifications
121 HRESULT UnregisterAudioSessionNotification
(
122 [in] IAudioSessionEvents
*NewNotifications
128 uuid(bfb7ff88
-7239-4fc9
-8fa2
-07c950be9c6d
),
129 pointer_default(unique),
132 interface IAudioSessionControl2
: IAudioSessionControl
134 HRESULT GetSessionIdentifier
(
135 [string,out] LPWSTR
*pRetVal
137 HRESULT GetSessionInstanceIdentifier
(
138 [string,out] LPWSTR
*pRetVal
140 HRESULT GetProcessId
(
143 HRESULT IsSystemSoundsSession
(void);
144 HRESULT SetDuckingPreferences
(
151 uuid(bfa971f1
-4d5e
-40bb
-935e-967039bfbee4
),
152 pointer_default(unique),
155 interface IAudioSessionManager
: IUnknown
157 HRESULT GetAudioSessionControl
(
158 [in] LPCGUID AudioSessionGuid
,
159 [in] DWORD StreamFlags
,
160 [out] IAudioSessionControl
**SessionControl
162 HRESULT GetSimpleAudioVolume
(
163 [in] LPCGUID AudioSessionGuid
,
164 [in] DWORD StreamFlags
,
165 [out] ISimpleAudioVolume
**AudioVolume
171 uuid(c3b284d4
-6d39
-4359-b3cf
-b56ddb3bb39c
),
172 pointer_default(unique),
175 interface IAudioVolumeDuckNotification
: IUnknown
177 HRESULT OnVolumeDuckNotification
(
178 [in] LPCWSTR sessionID
,
179 [in] UINT32 countCommunicationSessions
181 HRESULT OnVolumeUnduckNotification
(
182 [in] LPCWSTR sessionID
188 uuid(641dd20b
-4d41
-49cc
-aba3
-174b9477bb08
),
189 pointer_default(unique),
192 interface IAudioSessionNotification
: IUnknown
194 HRESULT OnSessionCreated
(
195 [in] IAudioSessionControl
*NewSession
201 uuid(e2f5bb11
-0570-40ca
-acdd
-3aa01277dee8
),
202 pointer_default(unique),
205 interface IAudioSessionEnumerator
: IUnknown
208 [out] INT *SessionCount
211 [in] INT SessionCount
,
212 [out] IAudioSessionControl
**Session
218 uuid(77aa99a0
-1bd6
-484f
-8bc7
-2c654c9a9b6f
),
219 pointer_default(unique),
222 interface IAudioSessionManager2
: IAudioSessionManager
224 HRESULT GetSessionEnumerator
(
225 [retval,out] IAudioSessionEnumerator
**SessionEnum
227 HRESULT RegisterSessionNotification
(
228 [in] IAudioSessionNotification
*SessionNotification
230 HRESULT UnregisterSessionNotification
(
231 [in] IAudioSessionNotification
*SessionNotification
233 HRESULT RegisterDuckNotification
(
234 [string,in] LPCWSTR sessionID
,
235 [in] IAudioVolumeDuckNotification
*duckNotification
237 HRESULT UnregisterDuckNotification
(
238 [in] IAudioVolumeDuckNotification
*duckNotification