Skip to content

Commit

Permalink
fix: Fade I/O - use channelType min and zero for setting target gain
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jun 28, 2019
1 parent 347d856 commit 6a935c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/MixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class MixerGenericConnection {

fadeUp(channelIndex: number, fadeTime: number) {
let outputLevel = parseFloat(this.store.channels[0].channel[channelIndex].outputLevel);
let targetVal = this.mixerProtocol.fader.zero;
let targetVal = this.mixerProtocol.channelTypes[0].toMixer.CHANNEL_OUT_GAIN[0].zero;
if (this.mixerProtocol.mode === "master") {
targetVal = parseFloat(this.store.channels[0].channel[channelIndex].faderLevel);
}
Expand Down Expand Up @@ -163,7 +163,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 min = this.mixerProtocol.channelTypes[0].toMixer.CHANNEL_OUT_GAIN[0].min;
const step = (outputLevel-min)/(fadeTime/FADE_INOUT_SPEED);
const dispatchResolution: number = FADE_DISPATCH_RESOLUTION*step;
let dispatchTrigger: number = 0;
Expand Down

0 comments on commit 6a935c6

Please sign in to comment.