[update] Made GC to collect forcibly before start playing music.
This commit is contained in:
parent
952a5825d6
commit
49408c0695
@ -1,6 +1,8 @@
|
|||||||
/// License: MIT
|
/// License: MIT
|
||||||
module sj.LoadingScene;
|
module sj.LoadingScene;
|
||||||
|
|
||||||
|
import core.memory;
|
||||||
|
|
||||||
import std.math,
|
import std.math,
|
||||||
std.typecons;
|
std.typecons;
|
||||||
|
|
||||||
@ -95,6 +97,8 @@ class LoadingScene : SceneInterface {
|
|||||||
if (anime_.isFinished) {
|
if (anime_.isFinished) {
|
||||||
// TODO: parallelize context creation
|
// TODO: parallelize context creation
|
||||||
auto context = music_.CreatePlayerContext(posteffect_, programs_.player);
|
auto context = music_.CreatePlayerContext(posteffect_, programs_.player);
|
||||||
|
GC.collect();
|
||||||
|
|
||||||
play_scene_.Initialize(music_, context, offset_beat_);
|
play_scene_.Initialize(music_, context, offset_beat_);
|
||||||
return play_scene_;
|
return play_scene_;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user