根据撒野提供的源代码,已找到答案,多谢zhihuali的帮助!
zhihuali请收分!
撒野:请到另一个贴子来捡分.
源程序如下:
3、4、5分别为立体声、左声道、右声道
procedure TForm1.Button3Click(Sender: TObject);
var
Vol : DWORD
begin
waveoutGetVolume(MediaPlayer1.DeviceID-1,@Vol)
Vol := Vol or $ffffffff
waveoutSetVolume(MediaPlayer1.DeviceID-1,Vol)
end;
procedure TForm1.Button4Click(Sender: TObject);
var
Vol : DWORD
begin
waveoutGetVolume(MediaPlayer1.DeviceID-1,@Vol)
Vol := ((Vol shr 16) shl 16) or $ffff0000
waveoutSetVolume(MediaPlayer1.DeviceID-1,Vol)
end;
procedure TForm1.Button5Click(Sender: TObject);
var
Vol : DWORD
begin
waveoutGetVolume(MediaPlayer1.DeviceID-1,@Vol)
Vol := ((Vol shl 16) shr 16) or $0000ffff
waveoutSetVolume(MediaPlayer1.DeviceID-1,Vol)
end;