forked from silfumus/ElectronicObserver
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Looks like win11 changed how audio sessions work. Before all apps just always had active audio sessions so we could initialize system volume on startup and save it on shutdown. Now, the audio sessions supposedly only show up when the application starts producing audio (though I had EO show up even without audio, so no idea).
We'll probably need to handle everything with COM
[Guid("641DD20B-4D41-49CC-ABA3-174B9477BB08")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IAudioSessionNotification
{
void OnSessionCreated(IAudioSessionControl newSession);
}
[Guid("bfa971f1-4d5e-40bb-935e-967039bfbee4")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IAudioSessionEvents
{
void OnDisplayNameChanged([MarshalAs(UnmanagedType.LPWStr)] string newDisplayName, Guid eventContext);
void OnIconPathChanged([MarshalAs(UnmanagedType.LPWStr)] string newIconPath, Guid eventContext);
void OnSimpleVolumeChanged(float newVolume, bool newMute, Guid eventContext);
void OnChannelVolumeChanged(uint channelCount, IntPtr newVolumes, uint channelIndex, Guid eventContext);
void OnGroupingParamChanged(Guid newGroupingParam, Guid eventContext);
void OnStateChanged(AudioSessionState newState);
void OnSessionDisconnected(AudioSessionDisconnectReason disconnectReason);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working