diff --git a/Pulsus/Audio/AudioEngine.cs b/Pulsus/Audio/AudioEngine.cs index 8f873b0..cbcc665 100644 --- a/Pulsus/Audio/AudioEngine.cs +++ b/Pulsus/Audio/AudioEngine.cs @@ -276,6 +276,9 @@ public void PlayScheduled(double position, SoundInstance soundInstance, int poly SoundInstanceInternal instance = new SoundInstanceInternal(soundInstance); + if (!dataInstanceCount.ContainsKey(instance.sound)) + dataInstanceCount.Add(instance.sound, 0); + double bufferPosition = (position - lastCallback) * ((double)audioSpec.freq); uint offset = (uint)(bufferPosition * bytesPerSample); if (offset % 4 != 0) diff --git a/Pulsus/Gameplay/EventPlayers/BGM.cs b/Pulsus/Gameplay/EventPlayers/BGM.cs index 2d08e1d..884af95 100644 --- a/Pulsus/Gameplay/EventPlayers/BGM.cs +++ b/Pulsus/Gameplay/EventPlayers/BGM.cs @@ -25,7 +25,7 @@ public override void OnPlayerStart() public override void OnBGM(SoundEvent soundEvent) { - if (seeking) + if (seeking && realtime) return; if (soundEvent.sound == null) diff --git a/Pulsus/Gameplay/EventPlayers/Player.cs b/Pulsus/Gameplay/EventPlayers/Player.cs index 8c4d943..77b38ec 100644 --- a/Pulsus/Gameplay/EventPlayers/Player.cs +++ b/Pulsus/Gameplay/EventPlayers/Player.cs @@ -66,7 +66,7 @@ public void PlayerReleaseKey(int lane) private void PressKey(int lane, SoundObject value, NoteEvent pressNote = null) { - if (seeking) + if (seeking && realtime) return; if (skin != null) @@ -141,7 +141,7 @@ private void PressKey(int lane, SoundObject value, NoteEvent pressNote = null) private void ReleaseKey(int lane, SoundObject value = null) { - if (seeking) + if (seeking && realtime) return; if (skin != null)