1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-08 16:42:53 +08:00

Merge pull request #8389 from peppy/increase-sample-concurrency

Increase sample concurrency to better match stable
This commit is contained in:
Dan Balasescu 2020-03-23 13:46:16 +09:00 committed by GitHub
commit b01c10e1f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -47,6 +47,8 @@ namespace osu.Game
{ {
public const string CLIENT_STREAM_NAME = "lazer"; public const string CLIENT_STREAM_NAME = "lazer";
public const int SAMPLE_CONCURRENCY = 6;
protected OsuConfigManager LocalConfig; protected OsuConfigManager LocalConfig;
protected BeatmapManager BeatmapManager; protected BeatmapManager BeatmapManager;
@ -153,6 +155,8 @@ namespace osu.Game
AddFont(Resources, @"Fonts/Venera-Bold"); AddFont(Resources, @"Fonts/Venera-Bold");
AddFont(Resources, @"Fonts/Venera-Black"); AddFont(Resources, @"Fonts/Venera-Black");
Audio.Samples.PlaybackConcurrency = SAMPLE_CONCURRENCY;
runMigrations(); runMigrations();
dependencies.Cache(SkinManager = new SkinManager(Storage, contextFactory, Host, Audio, new NamespacedResourceStore<byte[]>(Resources, "Skins/Legacy"))); dependencies.Cache(SkinManager = new SkinManager(Storage, contextFactory, Host, Audio, new NamespacedResourceStore<byte[]>(Resources, "Skins/Legacy")));

View File

@ -158,6 +158,7 @@ namespace osu.Game.Rulesets.UI
dependencies.Cache(textureStore); dependencies.Cache(textureStore);
localSampleStore = dependencies.Get<AudioManager>().GetSampleStore(new NamespacedResourceStore<byte[]>(resources, "Samples")); localSampleStore = dependencies.Get<AudioManager>().GetSampleStore(new NamespacedResourceStore<byte[]>(resources, "Samples"));
localSampleStore.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY;
dependencies.CacheAs<ISampleStore>(new FallbackSampleStore(localSampleStore, dependencies.Get<ISampleStore>())); dependencies.CacheAs<ISampleStore>(new FallbackSampleStore(localSampleStore, dependencies.Get<ISampleStore>()));
} }

View File

@ -52,7 +52,11 @@ namespace osu.Game.Skinning
if (storage != null) if (storage != null)
{ {
Samples = audioManager?.GetSampleStore(storage); var samples = audioManager?.GetSampleStore(storage);
if (samples != null)
samples.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY;
Samples = samples;
Textures = new TextureStore(new TextureLoaderStore(storage)); Textures = new TextureStore(new TextureLoaderStore(storage));
(storage as ResourceStore<byte[]>)?.AddExtension("ogg"); (storage as ResourceStore<byte[]>)?.AddExtension("ogg");