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); }
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); } } }
public async Task BassEngineSetup() { player = BassEngine.Instance; await player.OpenFile(@"C:\You Raise Me Up.mp3"); }