diff --git a/components/tracks/Track.tsx b/components/tracks/Track.tsx index 72ebdaf..1f3c076 100644 --- a/components/tracks/Track.tsx +++ b/components/tracks/Track.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { Volume2, VolumeX, Headphones, Trash2, ChevronDown, ChevronRight, CircleArrowOutUpRight, Upload, Plus, Mic } from 'lucide-react'; +import { Volume2, VolumeX, Headphones, Trash2, ChevronDown, ChevronRight, CircleArrowOutUpRight, Upload, Plus, Mic, Gauge } from 'lucide-react'; import type { Track as TrackType } from '@/types/track'; import { Button } from '@/components/ui/Button'; import { Slider } from '@/components/ui/Slider'; @@ -559,7 +559,7 @@ export function Track({ ) : ( <> - + Level )} @@ -570,8 +570,14 @@ export function Track({ orientation="horizontal" /> - - {Math.round((track.recordEnabled || isRecording ? recordingLevel : playbackLevel) * 100)}% + + {(() => { + const level = track.recordEnabled || isRecording ? recordingLevel : playbackLevel; + // Convert normalized (0-1) back to dB + // normalized = (dB - (-60)) / 60, so dB = (normalized * 60) - 60 + const db = (level * 60) - 60; + return level === 0 ? '-∞' : `${db.toFixed(0)}`; + })()}