播放视频老是没声音(30分)

G

gxdx

Unregistered / Unconfirmed
GUEST, unregistred user!
MCIExecute('Open g:/movie/Mulan.avi alias mulan');
MCIExecute('Play mulan');
这样的程序播出来的是没声音的。
要怎么做才会有声音呢?
 
你怎么不用opendialog控件打开,然后再用mediaplayer控件播放呢?那样肯定有声音
 
用mediaplayer控件简单,肯定不会出问题!
 
MediaPlayer1.FileName:=listbox1.Items.Strings[k];
label3.Caption:=listbox1.Items.Strings[k];
MediaPlayer1.Open;
Mediaplayer1.TimeFormat:=tfMilliseconds;
Thelength := Mediaplayer1.Length;
label1.Caption:= IntToStr(thelength div 60000 div 60)+':'+IntToStr(thelength div 60000 mod 60)+':'+IntToStr(thelength div 1000 mod 60);
d1:=(thelength div 60000 div 60 *3600)+(thelength div 60000 mod 60 *60)+(thelength div 1000 mod 60);
d2:=0;
mediaplayer1.Display:=Panel5;
panel5.Realign;
mediaplayer1.DoubleBuffered:=true;
mediaplayer1.DisplayRect:=rect(0,0,panel5.Width,panel5.Height);
timer2.Enabled:=true;
RealAudio1.Visible:=false;
mediaplayer1.Play;
 
顶部