speaker-equalizer
const SAMPLE_RATE = 48000;
const CONFIG_STEPS_PER_OCTAVE = 10;
const CONFIG_Q_STEP_FACTOR = 1.07;
const EQ_FILE_PREFIX = 'speaker-eq';
const AVAILABLE_FILTER_TYPES: BiquadFilterType[] = ['lowshelf', 'peaking', 'highshelf', 'generic_normalized'];
type Channel = 'left' | 'right';
type ChannelMode = 'individual' | 'both';
const backendCapabilities = ref<BackendCapabilities | null>(null);
const backendName = ref('');
const filterStore = useFilterStore();
const backendCapabilities = ref<BackendCapabilities | null>(null);
const backendName = ref('');
const activeChannel = ref<Channel>('left');
const channelMode = ref<ChannelMode>('individual');
const leftFilters = ref<Filter[]>([]);
const rightFilters = ref<Filter[]>([]);
const showAddFilterModal = ref(false);
const showBackendInfoModal = ref(false);
const showRoomEQModal = ref(false);
const loadingRoomEQConfigs = ref(false);
const roomEQConfigs = ref<RoomEQConfigItem[]>([]);
const selectedRoomEQConfig = ref<RoomEQConfigItem | null>(null);
const roomEQChannelMode = ref<'left' | 'right' | 'both'>('both');
const isBypassed = ref(false);
const previousFilterStates = ref<string[]>;
const activeFilterId = ref<number | null>(leftFilters.value[0]?.id || null);
const isDragging = ref(false);
computed canAddFilterToCurrentChannel();
computed currentChannelFilterInfo();
computed filters();
interface RoomEQConfig;
interface RoomEQConfigItem;
async function loadBackendCapabilities();
async function loadFiltersFromBackend();
async function removeFilterFromCurrentChannel();
async onMounted();
async function toggleChannelMode();
async function startBypass();
async function endBypass();
async function addFilterOfType();
async function removeFilter();
async function loadRoomEQSettings();
async function loadSlectedRoomEQConfig();
async function toggleFilterEnabled();
function createLinkedChhannelConfig();
function onGraphUpdateFreqGain();
function onGraphUpdateQ();
function onGraphDragStart();
function onGraphDragEnd();
function setActiveChannel();
function setActiveFilter();
function loadEQSettings();
function saveEQSettings
function convertRoomEQFilterToSpeakerEQ();
function incrementFilterFrequency();
function decrementFilterFrequency();
function incrementFilterGain();
function decrementFilterGain();
function widenFilterBand();
function narrowFilterBand();
function updateGenericCoeff();
function handleKeyDown();
function handleKeyUp();
onMounted();
onUnmounted()
watch();
watch();