Table of Contents

Class AudioSessionEventsCallback

Namespace
NAudio.CoreAudioApi
Assembly
NAudio.Wasapi.dll

AudioSessionEvents callback implementation

[GeneratedComClass]
[ComExposedClass<ComClassInformation>]
public class AudioSessionEventsCallback : IAudioSessionEvents
Inheritance
AudioSessionEventsCallback
Implements
Inherited Members

Constructors

AudioSessionEventsCallback(IAudioSessionEventsHandler)

Constructor.

public AudioSessionEventsCallback(IAudioSessionEventsHandler handler)

Parameters

handler IAudioSessionEventsHandler

Methods

OnChannelVolumeChanged(uint, nint, uint, ref Guid)

Notifies the client that the volume level of an audio channel in the session submix has changed.

public int OnChannelVolumeChanged(uint channelCount, nint newVolumes, uint channelIndex, ref Guid eventContext)

Parameters

channelCount uint
newVolumes nint
channelIndex uint
eventContext Guid

Returns

int

OnDisplayNameChanged(string, ref Guid)

Notifies the client that the display name for the session has changed.

public int OnDisplayNameChanged(string displayName, ref Guid eventContext)

Parameters

displayName string
eventContext Guid

Returns

int

OnGroupingParamChanged(ref Guid, ref Guid)

Notifies the client that the grouping parameter for the session has changed.

public int OnGroupingParamChanged(ref Guid groupingId, ref Guid eventContext)

Parameters

groupingId Guid
eventContext Guid

Returns

int

OnIconPathChanged(string, ref Guid)

Notifies the client that the display icon for the session has changed.

public int OnIconPathChanged(string iconPath, ref Guid eventContext)

Parameters

iconPath string
eventContext Guid

Returns

int

OnSessionDisconnected(AudioSessionDisconnectReason)

Notifies the client that the session has been disconnected.

public int OnSessionDisconnected(AudioSessionDisconnectReason disconnectReason)

Parameters

disconnectReason AudioSessionDisconnectReason

Returns

int

OnSimpleVolumeChanged(float, int, ref Guid)

Notifies the client that the volume level or muting state of the session has changed.

public int OnSimpleVolumeChanged(float volume, int isMuted, ref Guid eventContext)

Parameters

volume float
isMuted int
eventContext Guid

Returns

int

OnStateChanged(AudioSessionState)

Notifies the client that the stream-activity state of the session has changed.

public int OnStateChanged(AudioSessionState state)

Parameters

state AudioSessionState

Returns

int