diff --git a/SFZ_MIDI_Player/Main.cpp b/SFZ_MIDI_Player/Main.cpp index a4be79e..d8d3e5b 100644 --- a/SFZ_MIDI_Player/Main.cpp +++ b/SFZ_MIDI_Player/Main.cpp @@ -52,9 +52,7 @@ void Main() pianoRoll.pause(); audio.pause(); - Console << U"読み込み中:" << filepath.path; player.loadData(LoadSfz(filepath.path)); - Console << U"読み込み完了"; pianoRoll.resume(); audio.play(); diff --git a/SFZ_MIDI_Player/source/SamplePlayer.cpp b/SFZ_MIDI_Player/source/SamplePlayer.cpp index 8c838c8..dc04594 100644 --- a/SFZ_MIDI_Player/source/SamplePlayer.cpp +++ b/SFZ_MIDI_Player/source/SamplePlayer.cpp @@ -121,8 +121,12 @@ void SamplePlayer::loadData(const SfzData& sfzData) audioKey.init(static_cast(i - 127)); } - for (const auto& data : sfzData.data) + Window::SetTitle(U"音源読み込み中:0 %"); + for (const auto& [i, data] : Indexed(sfzData.data)) { + const auto progress = 1.0 * i / sfzData.data.size(); + Window::SetTitle(Format(U"音源読み込み中:", Math::Round(progress * 100), U" %")); + const auto samplePath = sfzData.dir + data.sample; if (!FileSystem::Exists(samplePath)) {