uses mmsystem;
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 sdchange;
var
s: MCI_DGV_SETAUDIO_PARMS
begin
//mediaplayer1 为控件NAME
mciSendCommand(MediaPlayer1.DeviceID,MCI_SETAUDIO,MCI_SET_OFF,integer(@s));
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_STEREO;
//立体声用这句
// s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_LEFT;
//右声道源
// s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_RIGHT;
//右声道源
s.dwItem:=MCI_DGV_SETAUDIO_SOURCE;
mciSendCommand(MediaPlayer1.DeviceID,MCI_SETAUDIO, MCI_DGV_SETAUDIO_VALUE or MCI_DGV_SETAUDIO_ITEM ,integer(@s));
mciSendCommand(MediaPlayer1.DeviceID,MCI_SETAUDIO, MCI_SET_ON,integer(@s));
end;
记住给分,我还有好多的好东东...