如何调节左右声道?(50分)

  • 主题发起人 主题发起人 柳枫
  • 开始时间 开始时间

柳枫

Unregistered / Unconfirmed
GUEST, unregistred user!
如何调节左右声道?
1)请问如何用Delphi自带控件:MediaPlayer 转换声道?
我用控件MediaPlayer 编了一个程序播放VCD,但不能
转换声道,2)用此构件如何控制CD音频,我想单击一个按
钮转到第7首歌, 请大侠指点小弟迷津!
谢谢!

柳枫
 
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:DWORD;
dwItem:DWORD;
dwValue:DWORD;
dwOver:DWORD;
lpstrAlgorithm:PChar;
lpstrQuality:PChar;
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;
 
唔该晒!!!!
 
接受答案了.
 
后退
顶部