Skip to content

Commit

Permalink
fix: new channelType - emberMixerConnection, subscription used ch ins…
Browse files Browse the repository at this point in the history
…tead og channelTypeIndex
  • Loading branch information
olzzon committed Jun 27, 2019
1 parent 5f2752f commit 0d630bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/EmberMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class EmberMixerConnection {
let ch: number = 1;
this.store.settings[0].numberOfChannelsInType.forEach((numberOfChannels, typeIndex) => {
for (let channelTypeIndex=0; channelTypeIndex < numberOfChannels ; channelTypeIndex++) {
this.subscribeFaderLevel(ch, typeIndex);
this.subscribeFaderLevel(ch, typeIndex, channelTypeIndex);
ch++;
}
})
Expand Down Expand Up @@ -97,8 +97,8 @@ export class EmberMixerConnection {
}
}

subscribeFaderLevel(ch: number, typeIndex: number) {
this.emberConnection.getNodeByPath(this.mixerProtocol.channelTypes[typeIndex].fromMixer.CHANNEL_FADER_LEVEL[0].replace("{channel}", String(ch)))
subscribeFaderLevel(ch: number, typeIndex: number, channelTypeIndex: number) {
this.emberConnection.getNodeByPath(this.mixerProtocol.channelTypes[typeIndex].fromMixer.CHANNEL_FADER_LEVEL[0].replace("{channel}", String(channelTypeIndex+1)))
.then((node: any) => {
console.log("Subscribing to channel :", ch);
this.emberConnection.subscribe(node, (() => {
Expand Down

0 comments on commit 0d630bb

Please sign in to comment.