怎样消除卡拉OK的原音并且两音箱的背景音乐还要存在 不能MCISENDSTRING(‘SET AUDIO RIGHT OFF’)这完事了(200分)

  • 主题发起人 主题发起人 liumingabc
  • 开始时间 开始时间
L

liumingabc

Unregistered / Unconfirmed
GUEST, unregistred user!
[:D]liumingabc@sina.com
 
你可能MCI命令注意查一下,SETAUDIO命令!!!
 
用directshow吧!
 
unit func;

interface

uses mmsystem,mplayer,Windows,Classes,Sysutils,Graphics,Jpeg,Registry,
winsock;

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;

TChannels=(Ch_Left,Ch_Right,Ch_Stereo,Ch_Mono);

procedure SwitchChinnel(MPlayer:TMediaplayer;ChSet:TChannels);
function FileLength(FileName:String):Extended;
function FreeSpaceOnTargetDrive(Drive:string):Extended;
function GetCdromDrive: char;
procedure SaveToSpJpeg(var sbitmap: Tbitmap;const DJpegFile: string;
SRect: trect);
procedure SetIP(ipdata:string);
function GetIp:string;
implementation


procedure SwitchChinnel(MPlayer:TMediaplayer;ChSet:TChannels);
var
s: MCI_DGV_SETAUDIO_PARMS
begin

mciSendCommand(MPlayer.DeviceID,MCI_SETAUDIO,MCI_SET_OFF,integer(@s));
case ChSet of
ch_stereo:
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_STEREO;
//立体声用这句
ch_left:
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_LEFT;
//右声道源
ch_right:
s.dwValue:=MCI_DGV_SETAUDIO_SOURCE_RIGHT;
//右声道源
end;

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;

end.

快点,拿分来!!!
 
后退
顶部