procedure SetWaveLeft(Volume:Integer);
//设置声音为左声道(Integer 1~13)
var
Wave:String;
begin
try
Wave :='$' + inttohex(0,4)+
inttohex(Volume*5000,4);
MMSystem.waveOutSetVolume(0,StrToInt(Wave));
except
PubUnit.ErrorMsgBox;
end;
end;
procedure SetWaveRigth(Volume:Integer);
//设置声音为右声道(Integer 1~13)
var
Wave:string;
begin
try
Wave :='$' + inttohex(Volume*5000,4) +
inttohex(0,4);
MMSystem.waveOutSetVolume(0,StrToInt(Wave));
except
PubUnit.ErrorMsgBox;
end;
end;
procedure SetWaveBalance(Volume:Integer);//设置声音为双声道(Integer 1~13)
var
Wave:String;
begin
try
Wave :='$' + inttohex(Volume *5000,4) +
inttohex(Volume*5000,4);
MMSystem.waveOutSetVolume(0,StrToInt(Wave));
except
PubUnit.ErrorMsgBox;
end;
end;