diff --git a/lib/hooks/useMultiTrackPlayer.ts b/lib/hooks/useMultiTrackPlayer.ts index 2566063..84df674 100644 --- a/lib/hooks/useMultiTrackPlayer.ts +++ b/lib/hooks/useMultiTrackPlayer.ts @@ -152,14 +152,15 @@ export function useMultiTrackPlayer( // Detect clipping (signal >= 1.0) const isClipping = peak >= 1.0; - setMasterPeakLevel(peak); - setMasterRmsLevel(rms); + // Convert to dB scale (same as track levels) for consistent metering + setMasterPeakLevel(linearToDbScale(peak)); + setMasterRmsLevel(linearToDbScale(rms)); if (isClipping) { setMasterIsClipping(true); } masterLevelMonitorFrameRef.current = requestAnimationFrame(monitorMasterLevels); - }, []); + }, [linearToDbScale]); // Apply automation values during playback const applyAutomation = useCallback(() => {