Skip to content

Commit

Permalink
fix: Individual fadetime, use fadeTime var instead of default value i…
Browse files Browse the repository at this point in the history
…n Fades
  • Loading branch information
olzzon committed Jun 21, 2019
1 parent 8b21206 commit dbf1f9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/MixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class MixerGenericConnection {
if (this.mixerProtocol.mode === "master") {
targetVal = parseFloat(this.store.channels[0].channel[channelIndex].faderLevel);
}
const step = (targetVal-outputLevel)/(this.store.settings[0].fadeTime/FADE_INOUT_SPEED);
const step = (targetVal-outputLevel)/(fadeTime/FADE_INOUT_SPEED);


if (targetVal<outputLevel) {
Expand Down Expand Up @@ -161,7 +161,7 @@ export class MixerGenericConnection {
fadeDown(channelIndex: number, fadeTime: number) {
let outputLevel = this.store.channels[0].channel[channelIndex].outputLevel;
const min = this.mixerProtocol.fader.min;
const step = (outputLevel-min)/(this.store.settings[0].fadeTime/FADE_INOUT_SPEED);
const step = (outputLevel-min)/(fadeTime/FADE_INOUT_SPEED);

this.timer[channelIndex] = setInterval(() => {

Expand Down Expand Up @@ -217,7 +217,7 @@ export class MixerGenericConnection {
fadeGrpUp(channelIndex: number, fadeTime: number) {
let outputLevel = parseFloat(this.store.channels[0].grpFader[channelIndex].outputLevel);
let targetVal = parseFloat(this.store.channels[0].grpFader[channelIndex].faderLevel);
const step = (targetVal-outputLevel)/(this.store.settings[0].fadeTime/FADE_INOUT_SPEED);
const step = (targetVal-outputLevel)/(fadeTime/FADE_INOUT_SPEED);

if (targetVal<outputLevel) {
this.grpTimer[channelIndex] = setInterval(() => {
Expand Down Expand Up @@ -271,7 +271,7 @@ export class MixerGenericConnection {
fadeGrpDown(channelIndex: number, fadeTime: number) {
let outputLevel = this.store.channels[0].grpFader[channelIndex].outputLevel;
const min = this.mixerProtocol.fader.min;
const step = (outputLevel-min)/(this.store.settings[0].fadeTime/FADE_INOUT_SPEED);
const step = (outputLevel-min)/(fadeTime/FADE_INOUT_SPEED);

this.grpTimer[channelIndex] = setInterval(() => {

Expand Down

0 comments on commit dbf1f9b

Please sign in to comment.