C#中media player 控件的音轨如何用代码切换?
我通过插件让Media player可以切换音轨了,如果用源代码切换?我是做个伴唱功能,要再原唱和伴唱间切换!播放mkv文件!
如果有懂的请说详细点!
------解决方案--------------------ding 好像是用第三方控件吧
------解决方案--------------------  //private bool bool no sound=false;//是否静音
   //        private int num sound value =0;//音量
   //        private string str load dir="";//文件目录
   //        public Form1()
   //        {
   //            File.AppendAllText("LoadMusic.txt","");//打开文件,追加字符窜
   //            InitializeComponent();
   //            str load dir=File.ReadAllText("LoadMusic.txt");
   //            if(str load dir!="")
   //            LoadMusics();
   //        }
   //       public void LoadMusics()
   //       {
   //           try
   //           {//遍历打开的文件,将文件名添加到ListBox控件中,加入播放文件列表
   //               foreach(string filename in Directory.GetFiles(str Load dir))
   //               {
   //                   FileInfo fi=new FileInfo(filename);
   //                   if(fi.Extension==".*"||fi.Extension==".wmv"||fi.Extension==".mp3"||fi.Extension==".wma"||fi.Extension==".avi")
   //                   {
   //                       listBox1.Items.Add(fi.Name);
   //                       axWindowsMediaPlayer1.currentPlaylist.insertItem(axWindowsMediaPlayer1.currentPlaylist.count.axWindowsMediaPlayer1.newMedia(filename));
   //                   }
   //               }
   //           }
   //           catch
   //           {
   //               File.WriteAllText("LoadMusic.txt","");
   //           }
   //       }
   //        private void 打开ToolStripMenuItem Click(object sender,EventArgs e)
   //        {
   //            OpenFileDialog open=new OpenFileDialog();//对话框对象
   //            //过滤条件
   //            open.Filter="所有文件.*|*.*|Wmv视频.wmv|*.wmv|歌曲.mp3|*.mp3|歌曲.wma|*.wma|文件.avi|*.avi";
   //            open.FilterIndex=1;
   //            if(open.ShowDialog()==DialogResult.OK)
   //            {
   //                FileInfo fi=new FileInfo(open.FileName);//获取文件
   //                int i;
   //                //将打开的稳健添加到ListBox控件中
   //                for(i=0;i<listBox1.Items.Count;i++)
   //                {
   //                    if(fi.Name==listBox1.Items[i].ToString())//有重复不添加
   //                        break;
   //                }
   //                if(i==listBox1.Items.Count)
   //                {
   //                    this.listBox1.Items.Add(fi.Name);//添加到ListBox控件中
   //                    //播放文件
   //                  axWindowsMediaPlayer1.currentPlaylist.insertItem(axWindowsMediaPlayer1.currentPlaylist.count.axWindowsMediaPlayer1.newMedia(open.FileName));
   //                }
   //            }
   //        }
   //        bool isplayer=true;
   //        private void label3 Click(object sender,EventArgs e)
   //        {
   //            if(isplayer)
   //            {
   //                axWindowsMediaPlayer1.Ctlcontrols.pause();//暂停
   //                this.label3.Text="播放";
   //                isplayer=false;
   //            }
   //            else
   //            {
   //                axWindowsMediaPlayer1.Ctlcontrols.play();//播放
   //                this.label3.Text="暂停";
   //                isplayer=true;
   //            }
   //        }
   //        private void label4 Click(object sender,EventArgs e)
   //        {
   //            axWindowsMediaPlayer1.Ctlcontrols.stop();//停止
   //        }
   //        private void label1 Click(object sender,EventArgs e)