const
MCI_SETAUDIO= $873;
MCI_DGV_SETAUDIO_SOURCE_LEFT=1;
MCI_DGV_SETAUDIO_SOURCE_STEREO=0;
MCI_DGV_SETAUDIO_SOURCE_RIGHT=2;
MCI_DGV_SETAUDIO_SOURCE=$4004;
MCI_DGV_SETAUDIO_VALUE=$01000000;
MCI_DGV_SETAUDIO_ITEM=$00800000;
type MCI_DGV_SETAUDIO_PARMS=record
dwCallback
WORD;
dwItem
WORD;
dwValue
WORD;
dwOver
WORD;
lpstrAlgorithm
Char;
lpstrQuality
Char;
end
//立体声
procedure Tmainfrm.sdchange;
var
s: MCI_DGV_SETAUDIO_PARMS
begin
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO,MCI_SET_OFF,integer(@s));
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_STEREO;
s.dwItem:=MCI_DGV_SETAUDIO_SOURCE;
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO, MCI_DGV_SETAUDIO_VALUE or MCI_DGV_SETAUDIO_ITEM ,integer(@s));
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO, MCI_SET_ON,integer(@s));
end;
//左声道
procedure Tmainfrm.sdchangel;
var
s: MCI_DGV_SETAUDIO_PARMS
begin
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO,MCI_SET_OFF,integer(@s));
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_LEFT;
s.dwItem:=MCI_DGV_SETAUDIO_SOURCE;
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO, MCI_DGV_SETAUDIO_VALUE or MCI_DGV_SETAUDIO_ITEM ,integer(@s));
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO, MCI_SET_ON,integer(@s));
end;
//右声道
procedure Tmainfrm.sdchanger;
var
s: MCI_DGV_SETAUDIO_PARMS
begin
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO,MCI_SET_OFF,integer(@s));
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_RIGHT;
s.dwItem:=MCI_DGV_SETAUDIO_SOURCE;
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO, MCI_DGV_SETAUDIO_VALUE or MCI_DGV_SETAUDIO_ITEM ,integer(@s));
mciSendCommand(mplayer.DeviceID,MCI_SETAUDIO, MCI_SET_ON,integer(@s));
end;