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;