Lazarus

Programming => Graphics and Multimedia => Audio and Video => Topic started by: pcurtis on October 29, 2020, 10:02:25 am

Title: [SOLVED] Systemwide audio mute
Post by: pcurtis on October 29, 2020, 10:02:25 am
Hi All,

How do I perform a system wide audio mute (MUTE not just set vol := 0) on Windows 10?

I have indicators on my keyboard that show when the system is muted.

Thanks in advance.
Title: Re: Systemwide audio mute
Post by: Jurassic Pork on October 29, 2020, 01:54:37 pm
hello,
you want to mute audio with a sendmessage ?
try this :
Code: Pascal  [Select][+][-]
  1. // uses windows
  2. // const APPCOMMAND_VOLUME_MUTE : Integer = $80000;
  3. //       WM_APPCOMMAND : Integer = $319;  
  4.   SendMessage(Application.Handle,
  5.            WM_APPCOMMAND,
  6.            0,
  7.            APPCOMMAND_VOLUME_MUTE
  8.            );          
  9.  

Friendly, J.P   ;)
Title: Re: Systemwide audio mute
Post by: pcurtis on October 29, 2020, 02:30:57 pm
Just the job. Thanks.
TinyPortal © 2005-2018