uses mmsystem;
//得到当前音量:
procedure GetVolume;
var allvolume,leftv,rightv:integer;
begin
waveoutgetvolume(0,@allvolume);
leftv:=allvolume and $0ffff;
rightv:=(allvolume and $0ffff0000) div $10000;
end;
//设置当前音量:
procedure SetVolume(left,right:integer);
var leftv,rightv:integer;
begin
leftv:=left;
rightv:=right;
mmsystem.waveOutSetVolume(0,leftv+rightv*65536);
end;
加分吧!!