-
Notifications
You must be signed in to change notification settings - Fork 647
metadata: Add audiopolicy.h
#4702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| pub type AudioSessionDisconnectReason = i32; | ||
| pub const DisconnectReasonDeviceRemoval: AudioSessionDisconnectReason = 0; | ||
| pub const DisconnectReasonExclusiveModeOverride: AudioSessionDisconnectReason = 5; | ||
| pub const DisconnectReasonFormatChanged: AudioSessionDisconnectReason = 2; | ||
| pub const DisconnectReasonServerShutdown: AudioSessionDisconnectReason = 1; | ||
| pub const DisconnectReasonSessionDisconnected: AudioSessionDisconnectReason = 4; | ||
| pub const DisconnectReasonSessionLogoff: AudioSessionDisconnectReason = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| #[win32] | ||
| mod Windows { | ||
| mod Win32 { | ||
| #[repr(i32)] | ||
| enum AudioSessionDisconnectReason { | ||
| DisconnectReasonDeviceRemoval = 0, | ||
| DisconnectReasonServerShutdown = 1, | ||
| DisconnectReasonFormatChanged = 2, | ||
| DisconnectReasonSessionLogoff = 3, | ||
| DisconnectReasonSessionDisconnected = 4, | ||
| DisconnectReasonExclusiveModeOverride = 5, | ||
| } | ||
| #[guid(0xf4b1a599_7266_4319_a8ca_e70acb11e8cd)] | ||
| interface IAudioSessionControl: IUnknown { | ||
| fn GetState(&self, pRetVal: *mut AudioSessionState) -> HRESULT; | ||
| fn GetDisplayName(&self, pRetVal: *mut PWSTR) -> HRESULT; | ||
| fn SetDisplayName(&self, Value: PCWSTR, EventContext: *const GUID) -> HRESULT; | ||
| fn GetIconPath(&self, pRetVal: *mut PWSTR) -> HRESULT; | ||
| fn SetIconPath(&self, Value: PCWSTR, EventContext: *const GUID) -> HRESULT; | ||
| fn GetGroupingParam(&self, pRetVal: *mut GUID) -> HRESULT; | ||
| fn SetGroupingParam(&self, Override: *const GUID, EventContext: *const GUID) -> HRESULT; | ||
| fn RegisterAudioSessionNotification(&self, NewNotifications: IAudioSessionEvents) -> HRESULT; | ||
| fn UnregisterAudioSessionNotification(&self, NewNotifications: IAudioSessionEvents) -> HRESULT; | ||
| } | ||
| #[guid(0xbfb7ff88_7239_4fc9_8fa2_07c950be9c6d)] | ||
| interface IAudioSessionControl2: IAudioSessionControl { | ||
| fn GetSessionIdentifier(&self, pRetVal: *mut PWSTR) -> HRESULT; | ||
| fn GetSessionInstanceIdentifier(&self, pRetVal: *mut PWSTR) -> HRESULT; | ||
| fn GetProcessId(&self, pRetVal: *mut u32) -> HRESULT; | ||
| fn IsSystemSoundsSession(&self) -> HRESULT; | ||
| fn SetDuckingPreference(&self, optOut: BOOL) -> HRESULT; | ||
| } | ||
| #[guid(0xe2f5bb11_0570_40ca_acdd_3aa01277dee8)] | ||
| interface IAudioSessionEnumerator: IUnknown { | ||
| fn GetCount(&self, SessionCount: *mut i32) -> HRESULT; | ||
| fn GetSession(&self, SessionCount: i32, Session: *mut IAudioSessionControl) -> HRESULT; | ||
| } | ||
| #[guid(0x24918acc_64b3_37c1_8ca9_74a66e9957a8)] | ||
| interface IAudioSessionEvents: IUnknown { | ||
| fn OnDisplayNameChanged(&self, NewDisplayName: PCWSTR, EventContext: *const GUID) -> HRESULT; | ||
| fn OnIconPathChanged(&self, NewIconPath: PCWSTR, EventContext: *const GUID) -> HRESULT; | ||
| fn OnSimpleVolumeChanged(&self, NewVolume: f32, NewMute: BOOL, EventContext: *const GUID) -> HRESULT; | ||
| fn OnChannelVolumeChanged(&self, ChannelCount: u32, #[len_param(0)] NewChannelVolumeArray: *const f32, ChangedChannel: u32, EventContext: *const GUID) -> HRESULT; | ||
| fn OnGroupingParamChanged(&self, NewGroupingParam: *const GUID, EventContext: *const GUID) -> HRESULT; | ||
| fn OnStateChanged(&self, NewState: AudioSessionState) -> HRESULT; | ||
| fn OnSessionDisconnected(&self, DisconnectReason: AudioSessionDisconnectReason) -> HRESULT; | ||
| } | ||
| #[guid(0xbfa971f1_4d5e_40bb_935e_967039bfbee4)] | ||
| interface IAudioSessionManager: IUnknown { | ||
| fn GetAudioSessionControl(&self, #[opt] AudioSessionGuid: *const GUID, StreamFlags: u32, SessionControl: *mut IAudioSessionControl) -> HRESULT; | ||
| fn GetSimpleAudioVolume(&self, #[opt] AudioSessionGuid: *const GUID, StreamFlags: u32, AudioVolume: *mut ISimpleAudioVolume) -> HRESULT; | ||
| } | ||
| #[guid(0x77aa99a0_1bd6_484f_8bc7_2c654c9a9b6f)] | ||
| interface IAudioSessionManager2: IAudioSessionManager { | ||
| fn GetSessionEnumerator(&self, #[retval] SessionEnum: *mut IAudioSessionEnumerator) -> HRESULT; | ||
| fn RegisterSessionNotification(&self, SessionNotification: IAudioSessionNotification) -> HRESULT; | ||
| fn UnregisterSessionNotification(&self, SessionNotification: IAudioSessionNotification) -> HRESULT; | ||
| fn RegisterDuckNotification(&self, sessionID: PCWSTR, duckNotification: IAudioVolumeDuckNotification) -> HRESULT; | ||
| fn UnregisterDuckNotification(&self, duckNotification: IAudioVolumeDuckNotification) -> HRESULT; | ||
| } | ||
| #[guid(0x641dd20b_4d41_49cc_aba3_174b9477bb08)] | ||
| interface IAudioSessionNotification: IUnknown { | ||
| fn OnSessionCreated(&self, NewSession: IAudioSessionControl) -> HRESULT; | ||
| } | ||
| #[guid(0xc3b284d4_6d39_4359_b3cf_b56ddb3bb39c)] | ||
| interface IAudioVolumeDuckNotification: IUnknown { | ||
| fn OnVolumeDuckNotification(&self, sessionID: PCWSTR, countCommunicationSessions: u32) -> HRESULT; | ||
| fn OnVolumeUnduckNotification(&self, sessionID: PCWSTR) -> HRESULT; | ||
| } | ||
| } | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.