mute button
This commit is contained in:
@@ -171,4 +171,17 @@ void getVolumeLimit(IAudioEndpointVolume* volumeInterface, float* outMin, float*
|
||||
{
|
||||
float dummy;
|
||||
volumeInterface->GetVolumeRange(outMin, outMax, &dummy);
|
||||
}
|
||||
|
||||
bool isMuted(IAudioEndpointVolume* volumeInterface)
|
||||
{
|
||||
BOOL result = false;
|
||||
if (FAILED(volumeInterface->GetMute(&result))) return false;
|
||||
|
||||
return static_cast<bool>(result);
|
||||
}
|
||||
|
||||
void setMuted(IAudioEndpointVolume* volumeInterface, bool newState)
|
||||
{
|
||||
volumeInterface->SetMute(static_cast<BOOL>(newState), NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user