File tree 4 files changed +7
-8
lines changed
4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,6 @@ public interface ISample : IAdjustableAudioComponent
15
15
/// </summary>
16
16
string Name { get ; }
17
17
18
- /// <summary>
19
- /// The length in milliseconds of this <see cref="ISample"/>.
20
- /// </summary>
21
- double Length { get ; }
22
-
23
18
/// <summary>
24
19
/// The number of times this sample (as identified by name) can be played back concurrently.
25
20
/// </summary>
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ protected Sample(string name)
19
19
Name = name ;
20
20
}
21
21
22
- public double Length { get ; protected set ; }
23
22
public Bindable < int > PlaybackConcurrency { get ; } = new Bindable < int > ( DEFAULT_CONCURRENCY ) ;
24
23
25
24
internal Action < Sample > OnPlay ;
Original file line number Diff line number Diff line change @@ -212,11 +212,15 @@ private void ensureChannel() => EnqueueAction(() =>
212
212
if ( ! hasChannel )
213
213
return ;
214
214
215
+ Logging . Logger . Log ( $ "SampleChannelBass got created { ++ createCount } times so far") ;
216
+
215
217
setLoopFlag ( Looping ) ;
216
218
217
219
relativeFrequencyHandler . SetChannel ( channel ) ;
218
220
} ) ;
219
221
222
+ private static int createCount = 0 ;
223
+
220
224
#region Mixing
221
225
222
226
private BassAudioMixer bassMixer => ( BassAudioMixer ) Mixer . AsNonNull ( ) ;
@@ -231,13 +235,16 @@ private void ensureChannel() => EnqueueAction(() =>
231
235
232
236
#endregion
233
237
238
+ private static int disposeCount = 0 ;
239
+
234
240
protected override void Dispose ( bool disposing )
235
241
{
236
242
if ( IsDisposed )
237
243
return ;
238
244
239
245
if ( hasChannel )
240
246
{
247
+ Logging . Logger . Log ( $ "SampleChannelBass got disposed { ++ disposeCount } times so far") ;
241
248
bassMixer . StreamFree ( this ) ;
242
249
channel = 0 ;
243
250
}
Original file line number Diff line number Diff line change @@ -51,8 +51,6 @@ public SampleChannel GetChannel()
51
51
52
52
string ISample . Name => sample . Name ;
53
53
54
- public double Length => sample . Length ;
55
-
56
54
public Bindable < int > PlaybackConcurrency { get ; } = new Bindable < int > ( Sample . DEFAULT_CONCURRENCY ) ;
57
55
58
56
private IAudioMixer ? mixer ;
You can’t perform that action at this time.
0 commit comments