diff --git a/components/editor/AudioEditor.tsx b/components/editor/AudioEditor.tsx index 963c1f1..60dd86d 100644 --- a/components/editor/AudioEditor.tsx +++ b/components/editor/AudioEditor.tsx @@ -76,6 +76,13 @@ export function AudioEditor() { const [exportDialogOpen, setExportDialogOpen] = React.useState(false); const [isExporting, setIsExporting] = React.useState(false); const [analyzerView, setAnalyzerView] = React.useState<'frequency' | 'spectrogram' | 'phase' | 'lufs' | 'stats'>('frequency'); + + // Switch away from spectrogram if it gets disabled + React.useEffect(() => { + if (analyzerView === 'spectrogram' && !settings.performance.enableSpectrogram) { + setAnalyzerView('frequency'); + } + }, [analyzerView, settings.performance.enableSpectrogram]); const [projectsDialogOpen, setProjectsDialogOpen] = React.useState(false); const [projects, setProjects] = React.useState([]); const [currentProjectId, setCurrentProjectId] = React.useState(null); @@ -100,6 +107,11 @@ export function AudioEditor() { setSampleRate, } = useRecording(); + // Sync recording sample rate with global settings + React.useEffect(() => { + setSampleRate(settings.audio.sampleRate); + }, [settings.audio.sampleRate, setSampleRate]); + // Multi-track hooks const { tracks, @@ -1606,7 +1618,7 @@ export function AudioEditor() { {/* Analyzer Toggle */} -
+
- + {settings.performance.enableSpectrogram && ( + + )}