Code tidies.

This commit is contained in:
Matthew Stratford 2021-01-28 20:07:00 +00:00
parent f84987c8de
commit df097308ed
4 changed files with 6 additions and 9 deletions

View file

@ -415,7 +415,7 @@ export class AudioEngine extends ((EngineEmitter as unknown) as {
// Player Input
this.playerAnalysers = [];
for (let i = 0; i <= PLAYER_COUNT; i++) {
for (let i = 0; i < PLAYER_COUNT; i++) {
let analyser = new StereoAnalyserNode(this.audioContext);
analyser.fftSize = ANALYSIS_FFT_SIZE;
this.playerAnalysers[i] = analyser;

View file

@ -11,7 +11,6 @@ const DB_CONST = 20.0;
declare const sampleRate: number;
type StereoModeEnum = "M3" | "M6" | "AB";
// @ts-ignore
class DBFSPeakProcessor extends AudioWorkletProcessor {
process(
inputs: Float32Array[][],

View file

@ -472,7 +472,6 @@ export const load = (
dispatch(
changeSetting({
key: "channelOutputIds",
// @ts-ignore
val: Array(PLAYER_COUNT).fill(channelOutputId),
})
);
@ -555,7 +554,7 @@ export const load = (
}
});
playerInstance.on("finish", () => {
// PFL on PFL Player
// If the PFL Player finishes playing, turn of PFL.
if (player === PLAYER_PFL_ID) {
dispatch(setChannelPFL(player, false));
}
@ -633,7 +632,7 @@ export const play = (player: number): AppThunk => async (
return;
}
// PFL on PFL Player
// If it's the PFL player starting, turn on PFL automatically.
if (player === PLAYER_PFL_ID) {
dispatch(setChannelPFL(player, true));
}
@ -678,7 +677,7 @@ export const pause = (player: number): AppThunk => (dispatch, getState) => {
if (audioEngine.players[player]?.isPlaying) {
audioEngine.players[player]?.pause();
} else {
// PFL on PFL Player
// If it's the PFL player starting, turn on PFL automatically.
if (player === PLAYER_PFL_ID) {
dispatch(setChannelPFL(player, true));
}
@ -709,7 +708,8 @@ export const stop = (player: number): AppThunk => (dispatch, getState) => {
}
playerInstance.stop();
// PFL on PFL Player
// If we're stoping the PFL player, turn off PFL in the UI.
if (player === PLAYER_PFL_ID) {
dispatch(setChannelPFL(player, false));
}

View file

@ -52,7 +52,6 @@ function ChannelOutputSelect({
dispatch(
changeSetting({
key: "channelOutputIds",
// @ts-ignore
val: channelOutputIds,
})
);
@ -120,7 +119,6 @@ export function AdvancedTab() {
fetchOutputNames();
}, []);
// @ts-ignore
return (
<>
<h2>Selector Options</h2>