Table of Contents

Interface IAudioSessionEventsHandler

Namespace
NAudio.CoreAudioApi.Interfaces
Assembly
NAudio.Wasapi.dll

interface to receive session related events

public interface IAudioSessionEventsHandler

Methods

OnChannelVolumeChanged(uint, nint, uint)

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

void OnChannelVolumeChanged(uint channelCount, nint newVolumes, uint channelIndex)

Parameters

channelCount uint

The channel count.

newVolumes nint

An array of volumnes cooresponding with each channel index.

channelIndex uint

The number of the channel whose volume level changed.

OnDisplayNameChanged(string)

notification of display name changed

void OnDisplayNameChanged(string displayName)

Parameters

displayName string

the current display name

OnGroupingParamChanged(ref Guid)

notification of the client that the grouping parameter for the session has changed

void OnGroupingParamChanged(ref Guid groupingId)

Parameters

groupingId Guid

The new grouping parameter for the session.

OnIconPathChanged(string)

notification of icon path changed

void OnIconPathChanged(string iconPath)

Parameters

iconPath string

the current icon path

OnSessionDisconnected(AudioSessionDisconnectReason)

notification of the client that the session has been disconnected

void OnSessionDisconnected(AudioSessionDisconnectReason disconnectReason)

Parameters

disconnectReason AudioSessionDisconnectReason

The reason that the audio session was disconnected.

OnStateChanged(AudioSessionState)

notification of the client that the stream-activity state of the session has changed

void OnStateChanged(AudioSessionState state)

Parameters

state AudioSessionState

The new session state.

OnVolumeChanged(float, bool)

notification of volume changes including muting of audio session

void OnVolumeChanged(float volume, bool isMuted)

Parameters

volume float

the current volume

isMuted bool

the current mute state, true muted, false otherwise