Skip to content

Commit

Permalink
fix: loading storage with more channels than faders. (e.g. a fader co…
Browse files Browse the repository at this point in the history
…ntrolling a 5.1 setup)
  • Loading branch information
olzzon committed Feb 3, 2020
1 parent b181378 commit 93e10ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/utils/SettingsStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const loadSnapshotState = (stateSnapshot: any, stateChannelSnapshot: any,
});
} else {
stateChannelSnapshot.channel = stateChannelSnapshot.channel.map((channel: any, index: number) => {
if (index < numberOfFaders) {
if (stateFromFile.channelState.channel[index].assignedFader >= 0) {
channel.auxLevel = stateFromFile.channelState.channel[index].auxLevel || []
channel.assignedFader = stateFromFile.channelState.channel[index].assignedFader
} else {
Expand Down
8 changes: 5 additions & 3 deletions server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@ export class OscMixerConnection {
if (item.type === 'aux') {
state.channels[0].channel.forEach((channel: any, index: number) => {
channel.auxLevel.forEach((auxLevel: any, auxIndex: number) => {
if (channel.assignedFader >= 0){
setTimeout(() => {
this.sendOutRequestAux(item.mixerMessage, auxIndex +1, state.faders[0].fader[channel.assignedFader].monitor)
},
state.faders[0].fader[channel.assignedFader].monitor * 10 + auxIndex * 100)
this.sendOutRequestAux(item.mixerMessage, auxIndex +1, state.faders[0].fader[channel.assignedFader].monitor)
},
state.faders[0].fader[channel.assignedFader].monitor * 10 + auxIndex * 100)
}
})
})
} else {
Expand Down

0 comments on commit 93e10ec

Please sign in to comment.