fix: linux display main page
This commit is contained in:
@@ -68,8 +68,14 @@ function getPeqCrossoverPoints(
|
||||
getPeqCurvePoints({ freqs, bands: peqChain.bands as any }),
|
||||
getCrossoverCurvePoints({
|
||||
freqs,
|
||||
highPass: { frequency: crossover.high_pass.frequency, filter_type: crossover.high_pass.slope as any },
|
||||
lowPass: { frequency: crossover.low_pass.frequency, filter_type: crossover.low_pass.slope as any },
|
||||
highPass: {
|
||||
frequency: crossover.high_pass.frequency,
|
||||
filter_type: crossover.high_pass.slope as any,
|
||||
},
|
||||
lowPass: {
|
||||
frequency: crossover.low_pass.frequency,
|
||||
filter_type: crossover.low_pass.slope as any,
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
@@ -317,7 +323,9 @@ function GainSection({
|
||||
const [showOutputStages, setShowOutputStages] = useState(false);
|
||||
|
||||
const [liveInputGains, setLiveInputGains] = useState<Partial<Record<InputChannel, number>>>({});
|
||||
const [liveOutputGains, setLiveOutputGains] = useState<Partial<Record<OutputChannel, number>>>({});
|
||||
const [liveOutputGains, setLiveOutputGains] = useState<Partial<Record<OutputChannel, number>>>(
|
||||
{}
|
||||
);
|
||||
|
||||
const setLiveInputGain = (channel: InputChannel, value: number | null) => {
|
||||
setLiveInputGains((prev) => {
|
||||
@@ -381,7 +389,11 @@ function GainSection({
|
||||
inputColors,
|
||||
showInputStages,
|
||||
(channel) =>
|
||||
getInputChannelCurves(dsp.state.current_config.input_states[channel], freqs, liveInputGains[channel])
|
||||
getInputChannelCurves(
|
||||
dsp.state.current_config.input_states[channel],
|
||||
freqs,
|
||||
liveInputGains[channel]
|
||||
)
|
||||
);
|
||||
|
||||
const outputCurves = buildCurvesForChannels(
|
||||
@@ -390,7 +402,11 @@ function GainSection({
|
||||
outputColors,
|
||||
showOutputStages,
|
||||
(channel) =>
|
||||
getOutputChannelCurves(dsp.state.current_config.output_states[channel], freqs, liveOutputGains[channel])
|
||||
getOutputChannelCurves(
|
||||
dsp.state.current_config.output_states[channel],
|
||||
freqs,
|
||||
liveOutputGains[channel]
|
||||
)
|
||||
);
|
||||
|
||||
const { yMin: inputYMin, yMax: inputYMax } = computeYAxisBounds(
|
||||
@@ -535,4 +551,4 @@ function GainSection({
|
||||
);
|
||||
}
|
||||
|
||||
export default GainSection;
|
||||
export default GainSection;
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from '../../constants';
|
||||
import { SidebarId } from '../../constants';
|
||||
import SignalFlowMatrix from '../../../../components/SignalFlowMatrix/SignalFlowMatrix';
|
||||
import './MatrixSection.css';
|
||||
import './Matrixsection.css';
|
||||
|
||||
const GAIN_VALUES: number[] = (() => {
|
||||
const values: number[] = [];
|
||||
|
||||
@@ -58,9 +58,7 @@ export function sumCurvePoints(pointArrays: CurvePoint[][]): CurvePoint[] {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function sumPhaseCurvePoints(
|
||||
pointArrays: CurvePoint[][]
|
||||
): CurvePoint[] {
|
||||
export function sumPhaseCurvePoints(pointArrays: CurvePoint[][]): CurvePoint[] {
|
||||
if (pointArrays.length === 0) return [];
|
||||
|
||||
const length = pointArrays[0].length;
|
||||
@@ -85,8 +83,7 @@ export function sumPhaseCurvePoints(
|
||||
}
|
||||
|
||||
// Wrap to [-180, 180].
|
||||
const wrapped =
|
||||
((((phase + 180) % 360) + 360) % 360) - 180;
|
||||
const wrapped = ((((phase + 180) % 360) + 360) % 360) - 180;
|
||||
|
||||
result[i] = {
|
||||
x: pointArrays[0][i].x,
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
CurvePoint,
|
||||
CurveStyle,
|
||||
Curve,
|
||||
DEFAULT_CURVE_COLORS,
|
||||
sumCurvePoints,
|
||||
} from './curve';
|
||||
import { CurvePoint, CurveStyle, Curve, DEFAULT_CURVE_COLORS, sumCurvePoints } from './curve';
|
||||
|
||||
export { sumCurvePoints };
|
||||
|
||||
|
||||
@@ -332,4 +332,4 @@ export function getPeqPhasePoints({
|
||||
x: freq,
|
||||
y: peqTotalPhaseDeg(freq, bands, sampleRate),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user