Skip to content

Commit

Permalink
fix: OscMixerConnection check parameter as optional for support when …
Browse files Browse the repository at this point in the history
…not in the mixerprotocol
  • Loading branch information
olzzon committed Mar 17, 2021
1 parent e738ba4 commit 609cb91
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
storeSetOutputLevel,
} from '../../reducers/channelActions'
import {
storeVuReductionLevel,
storeFaderLevel,
storeFaderLabel,
storeFaderFx,
Expand Down Expand Up @@ -96,7 +95,7 @@ export class OscMixerConnection {
this.checkOscCommand(
message.address,
this.mixerProtocol.channelTypes[0].fromMixer
.CHANNEL_VU[0].mixerMessage
.CHANNEL_VU?.[0].mixerMessage
)
) {
if (
Expand Down Expand Up @@ -127,7 +126,7 @@ export class OscMixerConnection {
this.checkOscCommand(
message.address,
this.mixerProtocol.channelTypes[0].fromMixer
.CHANNEL_VU_REDUCTION[0].mixerMessage
.CHANNEL_VU_REDUCTION?.[0].mixerMessage
)
) {
let ch = message.address.split('/')[this.cmdChannelIndex]
Expand All @@ -142,7 +141,7 @@ export class OscMixerConnection {
this.checkOscCommand(
message.address,
this.mixerProtocol.channelTypes[0].fromMixer
.CHANNEL_OUT_GAIN[0].mixerMessage
.CHANNEL_OUT_GAIN?.[0].mixerMessage
)
) {
let ch = message.address.split('/')[this.cmdChannelIndex]
Expand Down Expand Up @@ -230,8 +229,8 @@ export class OscMixerConnection {
} else if (
this.checkOscCommand(
message.address,
this.mixerProtocol.channelTypes[0].fromMixer
.AUX_LEVEL[0].mixerMessage
this.mixerProtocol.channelTypes?.[0].fromMixer
.AUX_LEVEL?.[0].mixerMessage
)
) {
let commandArray: string[] = this.mixerProtocol.channelTypes[0].fromMixer.AUX_LEVEL[0].mixerMessage.split(
Expand Down Expand Up @@ -279,7 +278,7 @@ export class OscMixerConnection {
this.checkOscCommand(
message.address,
this.mixerProtocol.channelTypes[0].fromMixer
.CHANNEL_NAME[0].mixerMessage
.CHANNEL_NAME?.[0].mixerMessage
)
) {
let ch = message.address.split('/')[this.cmdChannelIndex]
Expand All @@ -298,7 +297,7 @@ export class OscMixerConnection {
this.checkOscCommand(
message.address,
this.mixerProtocol.channelTypes[0].fromMixer
.CHANNEL_MUTE_ON[0].mixerMessage
.CHANNEL_MUTE_ON?.[0].mixerMessage
)
) {
let ch = message.address.split('/')[this.cmdChannelIndex]
Expand Down Expand Up @@ -445,7 +444,8 @@ export class OscMixerConnection {
})
}

checkOscCommand(message: string, command: string): boolean {
checkOscCommand(message: string, command: string | undefined): boolean {
if (!command) return false
if (message === command) return true
let messageArray: string[] = message.split('/')
let commandArray: string[] = command.split('/')
Expand Down

0 comments on commit 609cb91

Please sign in to comment.