diff --git a/client/public/version.js b/client/public/version.js index a2e562e..ecb2ef5 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.22 R134"; +window.CHGRID_WEB_VERSION = "2026.02.22 R135"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/audio/itemEmitRuntime.ts b/client/src/audio/itemEmitRuntime.ts index bb0d870..947433d 100644 --- a/client/src/audio/itemEmitRuntime.ts +++ b/client/src/audio/itemEmitRuntime.ts @@ -49,17 +49,9 @@ function resolveEmitRates(item: WorldItem): { playbackRate: number; preservePitc const globals = getItemTypeGlobalProperties(item.type); const speed = resolveEmitPlaybackRate(item.params.emitSoundSpeed ?? globals.emitSoundSpeed ?? 50); const tempo = resolveEmitPlaybackRate(item.params.emitSoundTempo ?? globals.emitSoundTempo ?? 50); - const speedOffset = Math.abs(speed - 1); - if (speedOffset > 0.001) { - return { - playbackRate: Math.max(0.25, Math.min(4, speed)), - preservePitch: false, - }; - } - return { - playbackRate: Math.max(0.25, Math.min(4, tempo)), - preservePitch: true, - }; + const playbackRate = Math.max(0.25, Math.min(4, speed * tempo)); + const preservePitch = Math.abs(speed - 1) < 0.001; + return { playbackRate, preservePitch }; } export class ItemEmitRuntime {