-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.IO; | ||
using osu.Framework.Bindables; | ||
|
||
namespace osu.Framework.Audio.Sample | ||
|
@@ -23,11 +22,8 @@ internal abstract class SampleFactory : AudioCollectionManager<AdjustableAudioCo | |
/// </summary> | ||
internal readonly Bindable<int> PlaybackConcurrency = new Bindable<int>(Sample.DEFAULT_CONCURRENCY); | ||
|
||
private protected Stream? Data; | ||
|
||
protected SampleFactory(Stream? data, string name, int playbackConcurrency) | ||
protected SampleFactory(string name, int playbackConcurrency) | ||
{ | ||
Data = data; | ||
Name = name; | ||
PlaybackConcurrency.Value = playbackConcurrency; | ||
|
||
|
@@ -67,12 +63,7 @@ protected override void Dispose(bool disposing) | |
return; | ||
|
||
if (IsLoaded) | ||
{ | ||
FreeSample(); | ||
} | ||
|
||
Data?.Dispose(); | ||
Data = null; | ||
|
||
base.Dispose(disposing); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters