File tree 1 file changed +4
-2
lines changed
osu.Framework/Audio/Sample
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) ppy Pty Ltd <[email protected] >. Licensed under the MIT Licence.
2
2
// See the LICENCE file in the repository root for full licence text.
3
3
4
+ using System ;
4
5
using ManagedBass ;
5
6
using osu . Framework . Audio . Mixing . Bass ;
6
7
using osu . Framework . Audio . Track ;
@@ -130,8 +131,10 @@ protected override void UpdateState()
130
131
131
132
public override void Play ( )
132
133
{
133
- userRequestedPlay = true ;
134
+ // Check if this channel is disposed first to not set enqueuedPlaybackStart to true, which also sets Playing to true.
135
+ ObjectDisposedException . ThrowIf ( IsDisposed , this ) ;
134
136
137
+ userRequestedPlay = true ;
135
138
userRequestedStop = false ;
136
139
137
140
// Pin Playing and IsAlive to true so that the channel isn't killed by the next update. This is only reset after playback is started.
@@ -152,7 +155,6 @@ public override void Play()
152
155
public override void Stop ( )
153
156
{
154
157
userRequestedPlay = false ;
155
-
156
158
userRequestedStop = true ;
157
159
158
160
base . Stop ( ) ;
You can’t perform that action at this time.
0 commit comments