Volume Control using D3?

Volume Control using D3?

Post by Rohit Kama » Sun, 31 Dec 1899 09:00:00



Is there any way (component) to control the volume of the PC aux. devices?
IF not - is there any call that I can make to invoke Windows' volume
control? Any help would be appreciated.


Thanks in advance.

Rohit

 
 
 

Volume Control using D3?

Post by Pedr » Sun, 31 Dec 1899 09:00:00



I hope this example help you!
Try this:

Uses mmsystem:

 var myVolume  : Longint;
     MyVolumeL : DWord;
     MyVolumeR : DWord;

Procedure GetVolume; {Digital Sound out}
begin

  MyVolumeR:=HiWord(myVolume);
  MyVolumeL:=LoWord(myVolume);
end;

Procedure SetVolume; {Digital Sound out}
begin
  MyVolume:=(MyVolumeR*65536)+MyVolumeL;
  waveOutSetVolume(0,myVolume);
end;

If you want aditional help mail me...
Regards,
Pedro Lopes - Portugal