SoundSaveDeviceVolume

VOID
SoundSaveDeviceVolume(
PLOCAL_DEVICE_INFO
pLDI,
PWSTR
KeyName
);

The SoundSaveDeviceVolume function writes both left and right channel volume settings into the registry.

Parameters

pLDI

Pointer to a LOCAL_DEVICE_INFO structure.

KeyName

The name of the registry subkey under which the volume setting is to be stored. The values are retrieved from the LeftVolumeName and RightVolumeName members of the structure pointed to by the DeviceInit member of pLDI.

Return Value

None.

Comments

Left and right volume values are obtained from the volume member of the LOCAL_DEVICE_INFO structure. The names associated with these volumes are obtained from the SOUND_DEVICE_INIT structure pointed to by the LOCAL_DEVICE_INFO structure.

Call the SoundSaveDeviceVolume function when the system shuts down or when the driver is unloaded. Do not use this function if the volume is controlled by a mixer.