System Volume Controls Mirror badly needed for BASSWasapi

Started by DeepDigger,

DeepDigger

Dear Creator,

BASS_WASAPI_SetVolume and BASS_WASAPI_SetMute functions let set system controls easily.

But an inverse task is not so easy.

I wouldn't like to call BASS_WASAPI_GetVolume ten times a second to smoothly mirror system session volume control in my application.

Is there any smart solution?

Is it - https://msdn.microsoft.com/en-us/library/windows/desktop/dd370839(v=vs.85).aspx - a hint for you?

Thank you.

Ian @ un4seen

BASSWASAPI doesn't currently have a volume/mute change notification system, but you could implement one yourself using the IAudioEndpointVolumeCallback interface, as in the link you posted. You can access the device of interest by using the "id" member of the BASS_WASAPI_DEVICEINFO structure in a IMMDeviceEnumerator::GetDevice call.

David_AVD


Ian @ un4seen

Not currently, but the IAudioEndpointVolumeCallback solution mentioned above could be used with BASS too. The only difference is that you would use the "driver" member of the BASS_DEVICEINFO structure instead of the "id" member of the BASS_WASAPI_DEVICEINFO structure.