delphi MediaPlayer循环播放MP3所有音乐文件问题?  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi MediaPlayer循环播放MP3所有音乐文件问题?


MediaPlayer用得不多, 只知道这种办法, . 假如你已有一个ListBox1并已经装载好全部MP3的完整路径信息了, 可以加一个TIMER1, 在 TIMER1的事件里写代码跟踪播放器的模式, 一停止即播放下一首歌.procedure TForm1.Timer1Timer(Sender: TObject);
begin
  if MediaPlayer1.Mode=mpStopped then
  begin
    ListBox1.itemindex:=ListBox1.itemindex+1;
    MediaPlayer1.FileName:=ListBox1.Items[ListBox1.itemindex];
    MediaPlayer1.Close;
    MediaPlayer1.Open;
    MediaPlayer1.Play;。

推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.050398111343384 seconds