Exemplo n.º 1
0
        private void LoadMusicFile(string filePath)
        {
            bassPlayer.OpenFile(filePath);

            this.MusicTotalLength = this.GetFormatTime(bassPlayer.ChannelLength.Hours
                                                       , bassPlayer.ChannelLength.Minutes
                                                       , bassPlayer.ChannelLength.Seconds
                                                       , bassPlayer.ChannelLength.Milliseconds);

            this.CurrentProgress = this.GetFormatTime(bassPlayer.ChannelPosition.Hours
                                                      , bassPlayer.ChannelPosition.Minutes
                                                      , bassPlayer.ChannelPosition.Seconds
                                                      , bassPlayer.ChannelPosition.Milliseconds);
        }
Exemplo n.º 2
0
 public static void PlayMusic(int index = -1)
 {
     if (index != -1)
     {
         PlayIndex = index;
     }
     if (songs.Count > PlayIndex && PlayIndex > -1)
     {
         tempSong = songs[PlayIndex];
         if (tempSong.FileUrl.StartsWith("http:"))
         {
             bassEng.OpenUrlAsync(tempSong.FileUrl);
         }
         else
         {
             if (!RemoveNotExitsFile(tempSong))
             {
                 return;
             }
             bassEng.OpenFile(tempSong.FileUrl);
         }
     }
 }
Exemplo n.º 3
0
 public async Task BassEngineSetup()
 {
     player = BassEngine.Instance;
     await player.OpenFile(@"C:\You Raise Me Up.mp3");
 }