feat: 未配置bpm时不启动回调

This commit is contained in:
2026-04-27 20:08:36 +08:00
parent 5bd0135f7b
commit 61414b2fef
2 changed files with 2 additions and 1 deletions
@@ -28,6 +28,7 @@ namespace OCES.Audio
internal void Restart(MusicContainer container, float inheritedBpm, double dspTime) internal void Restart(MusicContainer container, float inheritedBpm, double dspTime)
{ {
//Debug.Log($"[BeatClock] Restarting {container.Id}, inheritedBpm = {inheritedBpm}, dspTime = {dspTime}");
StopAll(); StopAll();
this.m_blendError = this.m_stopped = false; this.m_blendError = this.m_stopped = false;
this.m_containerId = container.Id; this.m_containerId = container.Id;
@@ -164,7 +164,7 @@ namespace OCES.Audio
onContainerStarted: () => onContainerStarted: () =>
{ {
MusicContainer container = this.m_containerConfig.QueryById(newContainerId); MusicContainer container = this.m_containerConfig.QueryById(newContainerId);
float bpm = container.Bpm > 0f ? container.Bpm : 120f; float bpm = container.Bpm;
// SyncPoint: BeatClock 用调整后的 dspTime,对齐到音频实际播放位置 // SyncPoint: BeatClock 用调整后的 dspTime,对齐到音频实际播放位置
double dspTime; double dspTime;