From 3d09ec57a4df83edd13b749c3ffd7fdbfe1e1bc5 Mon Sep 17 00:00:00 2001 From: hwsmm <9151706+hwsmm@users.noreply.github.com> Date: Sat, 30 Nov 2024 00:39:55 +0900 Subject: [PATCH] Convert TestTogglePlaying to use ManualFree --- .../Visual/Audio/TestSceneSampleChannels.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/osu.Framework.Tests/Visual/Audio/TestSceneSampleChannels.cs b/osu.Framework.Tests/Visual/Audio/TestSceneSampleChannels.cs index 2374b7edce..11e53e3f5f 100644 --- a/osu.Framework.Tests/Visual/Audio/TestSceneSampleChannels.cs +++ b/osu.Framework.Tests/Visual/Audio/TestSceneSampleChannels.cs @@ -113,13 +113,20 @@ public void TestPlayLoopingSample() } [Test] - public void TestTogglePlaying() + public void TestTogglePlayingManualFree() { SampleChannel channel = null; - AddStep("play sample", () => channel = sample.Play()); + AddStep("play sample", () => + { + channel = sample.GetChannel(); + channel.ManualFree = true; + channel.Play(); + }); + AddStep("stop channel", () => channel.Stop()); AddStep("start channel", () => channel.Play()); AddAssert("still playing", () => channel.Playing); + AddStep("dispose channel", () => channel.Dispose()); } [Test]