private void addButtonsForSource(string name, TestAudioPlayingSource source) { AddStep($"play track on {name}", source.PlayTrack); AddStep($"stop track on {name}", source.StopTrack); AddStep($"play sample on {name}", source.PlaySample); if (source != globalSource) { AddStep($"remove mixer {name}", () => source.Expire()); } }
protected override void LoadComplete() { base.LoadComplete(); addButtonsForSource("global", globalSource); AddStep("add mixer", () => { var source = new TestAudioPlayingSource(true); mixedSources.Add(source); addButtonsForSource($"mixer {mixedSources.Count}", source); }); }