Forum: Multimedia
Delphi
by Kas Ob.,
16. Okt 2023
Interesting !
Please try this
const
IID_IAudioEndpointVolumeEx: TGUID = '{66E11784-F695-4F28-A505-A7080081A78F}';
type
IAudioEndpointVolumeEx = interface(IAudioEndpointVolume)
function GetVolumeRangeChannel(nChannel: Integer; out pflVolumeMindB: double; out
Forum: Multimedia
Delphi
by Kas Ob.,
15. Okt 2023
Here is my full working example
procedure TForm10.Button3Click(Sender: TObject);
begin
SetMasterMuteState(True);
end;
procedure TForm10.Button4Click(Sender: TObject);
begin
SetMasterMuteState(False);
end;
Forum: Multimedia
Delphi
by Kas Ob.,
15. Okt 2023
Yes you are right there.
I messed that up, but in all cases the master is switching between muted and unmuted with that function, try to capture the R value.
Also it seems the behavior is different on my Windows
As you see in the Log Event first click is OK showing changing state followed by False because the state is not changed.
Forum: Multimedia
Delphi
by Kas Ob.,
14. Okt 2023
My two cents on this, Mute and Enable are intentionally undocumented by Microsoft, these will compromise the user privacy, like .. by simply enabling the disabled microphone in first place, or just unmute the speakers without the user consent and play some audio.
It is doable and it is not a hack, but unethical to share, so you have to ask the user himself to enable (eg. the Mic) or unmute the...