private void tempoTrackBar_Scroll(object sender, EventArgs e) { if (float.TryParse(txTempo.Text, out currentTempo)) { player.SetTempo(currentTempo); } }
private static void TestPlayer2(string file) { var lst = file.IsDirectory() ? Directory.GetFiles(file, "*", SearchOption.AllDirectories).ToList() : new List <string> { file }; var player = new XMediaPlayer(lst); player.Play(); var res = ""; while (res != "x") { res = Console.ReadLine(); float tempo = player.CurrentTempo(); if (float.TryParse(res, out tempo)) { player.SetTempo(tempo); } if (res == "n") { player.Next(); } if (res == "p") { player.Previous(); } if (res == "s") { player.Shuffle(); } } player.Stop(); }
private void trbBalance_Scroll(object sender, EventArgs e) { var ntp = (decimal)((decimal)trbBalance.Value / (decimal)100) + 1; player.SetTempo((float)ntp); }