Recent

Author Topic: [SOLVED] Systemwide audio mute  (Read 1395 times)

pcurtis

  • Hero Member
  • *****
  • Posts: 951
[SOLVED] Systemwide audio mute
« 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.
« Last Edit: October 30, 2020, 05:27:43 am by pcurtis »
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Systemwide audio mute
« Reply #1 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   ;)
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Systemwide audio mute
« Reply #2 on: October 29, 2020, 02:30:57 pm »
Just the job. Thanks.
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

 

TinyPortal © 2005-2018