Interface IAudioSessionEvents
- Namespace
- NAudio.CoreAudioApi.Interfaces
- Assembly
- NAudio.Wasapi.dll
Windows CoreAudio IAudioSessionControl interface Defined in AudioPolicy.h
[GeneratedComInterface(StringMarshalling = StringMarshalling.Utf16)]
[Guid("24918ACC-64B3-37C1-8CA9-74A66E9957A8")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[IUnknownDerived<InterfaceInformation, InterfaceImplementation>]
public interface IAudioSessionEvents
Methods
OnChannelVolumeChanged(uint, nint, uint, ref Guid)
Notifies the client that the volume level of an audio channel in the session submix has changed.
int OnChannelVolumeChanged(uint channelCount, nint newVolumes, uint channelIndex, ref Guid eventContext)
Parameters
channelCountuintThe channel count.
newVolumesnintAn array of volumnes cooresponding with each channel index.
channelIndexuintThe number of the channel whose volume level changed.
eventContextGuidA user context value that is passed to the notification callback.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.
OnDisplayNameChanged(string, ref Guid)
Notifies the client that the display name for the session has changed.
int OnDisplayNameChanged(string displayName, ref Guid eventContext)
Parameters
displayNamestringThe new display name for the session.
eventContextGuidA user context value that is passed to the notification callback.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.
OnGroupingParamChanged(ref Guid, ref Guid)
Notifies the client that the grouping parameter for the session has changed.
int OnGroupingParamChanged(ref Guid groupingId, ref Guid eventContext)
Parameters
groupingIdGuidThe new grouping parameter for the session.
eventContextGuidA user context value that is passed to the notification callback.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.
OnIconPathChanged(string, ref Guid)
Notifies the client that the display icon for the session has changed.
int OnIconPathChanged(string iconPath, ref Guid eventContext)
Parameters
iconPathstringThe path for the new display icon for the session.
eventContextGuidA user context value that is passed to the notification callback.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.
OnSessionDisconnected(AudioSessionDisconnectReason)
Notifies the client that the session has been disconnected.
int OnSessionDisconnected(AudioSessionDisconnectReason disconnectReason)
Parameters
disconnectReasonAudioSessionDisconnectReasonThe reason that the audio session was disconnected.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.
OnSimpleVolumeChanged(float, int, ref Guid)
Notifies the client that the volume level or muting state of the session has changed.
int OnSimpleVolumeChanged(float volume, int isMuted, ref Guid eventContext)
Parameters
volumefloatThe new volume level for the audio session.
isMutedintThe new muting state (Win32 BOOL — 0 or non-zero).
eventContextGuidA user context value that is passed to the notification callback.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.
OnStateChanged(AudioSessionState)
Notifies the client that the stream-activity state of the session has changed.
int OnStateChanged(AudioSessionState state)
Parameters
stateAudioSessionStateThe new session state.
Returns
- int
An HRESULT code indicating whether the operation succeeded of failed.