Skip to content

Commit

Permalink
feat: multiple mixers - Aux working for first mixer.
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Oct 9, 2020
1 parent 32a4abb commit 37c0ab8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions server/MainThreadHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export class MainThreadHandlers {
)
store.dispatch(
storeSetAuxLevel(
0,
payload.channel,
payload.auxIndex,
payload.level
Expand Down
2 changes: 2 additions & 0 deletions server/reducers/channelActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ export const storeSetOutputLevel = (
}

export const storeSetAuxLevel = (
mixerIndex: number,
channel: number,
auxIndex: number,
level: number
) => {
return {
type: SET_AUX_LEVEL,
mixerIndex: mixerIndex,
channel: channel,
auxIndex: auxIndex,
level: level,
Expand Down
6 changes: 3 additions & 3 deletions server/reducers/channelsReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ export const channels = (
].assignedFader = action.faderNumber
return nextState
case SET_AUX_LEVEL:
nextState[0].chConnection[0].channel[action.channel].auxLevel[
action.auxIndex
] = parseFloat(action.level)
nextState[0].chConnection[action.mixerIndex].channel[
action.channel
].auxLevel[action.auxIndex] = parseFloat(action.level)
return nextState
case SET_PRIVATE:
if (!nextState[0].chConnection[0].channel[action.channel].private) {
Expand Down
7 changes: 6 additions & 1 deletion server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,12 @@ export class OscMixerConnection {
message.args[0]
)
store.dispatch(
storeSetAuxLevel(ch - 1, auxIndex, message.args[0])
storeSetAuxLevel(
this.mixerIndex,
ch - 1,
auxIndex,
message.args[0]
)
)
global.mainThreadHandler.updateFullClientStore()
if (remoteConnections) {
Expand Down
9 changes: 8 additions & 1 deletion server/utils/mixerConnections/StuderVistaMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,14 @@ export class StuderVistaMixerConnection {
channelTypeIndex
)

store.dispatch(storeSetAuxLevel(channelArrayIndex, auxIndex, value))
store.dispatch(
storeSetAuxLevel(
this.mixerIndex,
channelArrayIndex,
auxIndex,
value
)
)

global.mainThreadHandler.updateFullClientStore()
remoteConnections.updateRemoteAuxPanels()
Expand Down
2 changes: 1 addition & 1 deletion server/utils/remoteConnections/SkaarhojRemoteConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class SkaarhojRemoteConnection {
' Level : ' +
level
)
store.dispatch(storeSetAuxLevel(chIndex, auxSendIndex, level))
store.dispatch(storeSetAuxLevel(0, chIndex, auxSendIndex, level))
mixerGenericConnection.updateAuxLevel(chIndex, auxSendIndex + 1)
global.mainThreadHandler.updateFullClientStore()
this.updateRemoteAuxPanel(panelNumber)
Expand Down

0 comments on commit 37c0ab8

Please sign in to comment.