R
roc
Unregistered / Unconfirmed
GUEST, unregistred user!
请看Delphi代码:
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
dwCallbackWORD;
dwItemWORD;
dwValueWORD;
dwOverWORD;
lpstrAlgorithmChar;
lpstrQualityChar;
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;
有谁能把Delphi的代码改写成C++Builder
200分
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
dwCallbackWORD;
dwItemWORD;
dwValueWORD;
dwOverWORD;
lpstrAlgorithmChar;
lpstrQualityChar;
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;
有谁能把Delphi的代码改写成C++Builder
200分