Mnemonic constant
|
Value
|
Meaning with data parameters
|
EV_COREAUDIO_DEVICE_STATE_CHANGED
|
0
|
Occurs when the state of an audio endpoint device changes. The current status of an audio endpoint device could be also queried using the CoreAudioDevices.StatusGet method..
Involved data parameters:
nData1: Zero-based index of the audio endpoint device which generated the event. The total number of audio endpoint devices can be obtained through the CoreAudioDevices.CountGet method.
When this parameter is set to -1 the application is notified about the fact that the status of one of the audio endpoint devices not previously enumerated through the call to the CoreAudioDevices.Enum method (for example a disabled device which become active and ready) has now changed its status so it could be worth calling again the CoreAudioDevices.Enum method in order to update the list of available audio endpoint devices.
nData2: Direction in which audio data flows between an audio endpoint device and an application. Supported values are the following:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_DATA_FLOW_RENDER
|
0
|
Audio rendering stream. Audio data flows from the application to the audio endpoint device, which renders the stream
|
DEVICE_DATA_FLOW_CAPTURE
|
1
|
Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, to the application.
|
nData3: New status assumed by the audio endpoint device. The returned value can be a combination of the following flags:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_STATE_ACTIVE
|
1
|
The device is active
|
DEVICE_STATE_DISABLED
|
2
|
The device is disabled
|
DEVICE_STATE_NOTPRESENT
|
4
|
The device is not present: the audio endpoint device is considered "not present" when the audio adapter has been installed and configured inside the system but it was physically removed at a later time: quite typical situation with devices connected through USB.
|
DEVICE_STATE_UNPLUGGED
|
8
|
The device is unplugged: the audio endpoint device is considered "unplugged" when the audio adapter that contains the jack for the endpoint device is present and enabled, but the endpoint device is not plugged into the jack
|
|
EV_COREAUDIO_DEVICE_ADDED
|
1
|
Occurs when a new audio endpoint device is added to the system. After catching this event you can get the updated list of available audio endpoint devices by calling again the CoreAudioDevices.Enum method.
Involved data parameters: none.
|
EV_COREAUDIO_DEVICE_REMOVED
|
2
|
Occurs when a new audio endpoint device is removed from the system. After catching this event you can get the updated list of available audio endpoint devices by calling again the CoreAudioDevices.Enum method.
Involved data parameters: none.
|
EV_COREAUDIO_DEVICE_DEFAULT_CHANGE
|
3
|
Occurs when the system defined default audio endpoint device changes. The current system default device can be also queried using the CoreAudioDevices.DefaultGet method..
By design this event is only sent to the first instance of the component.
Involved data parameters:
nData1: Zero-based index of the audio endpoint which is now the system default for the role set into the nRole parameter. The total number of audio endpoint devices can be obtained through the CoreAudioDevices.CountGet method.
This parameter may be set to -1 in case the device should have been unplugged from the system when the previous enumeration occurred, for example because an USB device was installed but not plugged in.
nData2: Direction in which audio data flows between an audio endpoint device and an application. Supported values are the following:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_DATA_FLOW_RENDER
|
0
|
Audio rendering stream. Audio data flows from the application to the audio endpoint device, which renders the stream
|
DEVICE_DATA_FLOW_CAPTURE
|
1
|
Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, to the application.
|
nData3: The role that the system has assigned to the audio endpoint device that became the new system default. Supported values are the following:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_ROLE_CONSOLE
|
0
|
Games, system notification sounds, and voice commands
|
DEVICE_ROLE_MULTIMEDIA
|
1
|
Music, movies, narration, and live music recording
|
DEVICE_ROLE_COMMUNICATIONS
|
2
|
Voice communications
|
|
EV_COREAUDIO_DEVICE_VOLUME_CHANGE
|
4
|
Occurs when the volume level of an audio endpoint device changes. After receiving this event you can query current volume through the CoreAudioDevices.ChannelVolumeGet and CoreAudioDevices.MasterVolumeGet methods.
Involved data parameters:
nData1: Zero-based index of the audio endpoint device which generated the event. The total number of audio endpoint devices can be obtained through the CoreAudioDevices.CountGet method.
nData2: Direction in which audio data flows between an audio endpoint device and an application. Supported values are the following:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_DATA_FLOW_RENDER
|
0
|
Audio rendering stream. Audio data flows from the application to the audio endpoint device, which renders the stream
|
DEVICE_DATA_FLOW_CAPTURE
|
1
|
Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, to the application.
|
|
EV_COREAUDIO_DEVICE_VUMETER_CHANGE
|
5
|
Occurs when the VU-Meter level of an audio endpoint device changes. After receiving this event you can query current peak values through the CoreAudioDevices.VuMeterMasterPeakValueGet and CoreAudioDevices.VuMeterChannelPeakValueGet methods.
Involved data parameters:
nData1: Zero-based index of the audio endpoint device which generated the event. The total number of audio endpoint devices can be obtained through the CoreAudioDevices.CountGet method.
nData2: Direction in which audio data flows between an audio endpoint device and an application. Supported values are the following:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_DATA_FLOW_RENDER
|
0
|
Audio rendering stream. Audio data flows from the application to the audio endpoint device, which renders the stream
|
DEVICE_DATA_FLOW_CAPTURE
|
1
|
Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, to the application.
|
|
EV_COREAUDIO_SESSION_VOLUME_CHANGE
|
6
|
Occurs when the volume or the mute status of the current session is modified through the Windows Mixer.
Involved data parameters:
nData1: The new volume, can be a value between 0 and 100
nData2: :The new mute status.
Supported values are the following:
Value
|
Meaning
|
0
|
The session volume is not muted.
|
1
|
The session volume is muted.
|
|
EV_COREAUDIO_DEVICE_PART_CHANGE
|
7
|
Occurs when the volume or mute status of a specific subpart of an audio endpoint device is modified by the user inside the Sound applet of the Windows Control Panel.
In order to obtain the updated volume levels and mute status, use the CoreAudioDevices.PartsVolumeGet and CoreAudioDevices.PartsMuteGet method in conjunction with the parameters passed to the event..
Involved data parameters:
nData1: Zero-based index of the audio endpoint device whose subpart generated the event. The total number of audio endpoint devices can be obtained through the CoreAudioDevices.CountGet method.
nData2: Direction in which audio data flows between an audio endpoint device and an application. Supported values are the following:
Mnemonic Value
|
Value
|
Meaning
|
DEVICE_DATA_FLOW_RENDER
|
0
|
Audio rendering stream. Audio data flows from the application to the audio endpoint device, which renders the stream
|
DEVICE_DATA_FLOW_CAPTURE
|
1
|
Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, to the application.
|
|