Skip to content

Commit

Permalink
Merge pull request tv2#131 from SuperFlyTV/olzzondevelop
Browse files Browse the repository at this point in the history
Olzzondevelop
  • Loading branch information
olzzon authored Mar 26, 2020
2 parents 474443a + 1899d1f commit c47c3b8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions server/utils/mixerConnections/CasparCGConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ const osc = require('osc')
const fs = require('fs')
import * as path from 'path';
import { CasparCG } from 'casparcg-connection'
import { socketServer } from '../../expressHandler'

//Utils:
import { store, state } from '../../reducers/store'
import { ICasparCGMixerGeometry, ICasparCGChannelLayerPair, ICasparCGMixerGeometryFile } from '../../constants/MixerProtocolInterface';
import { IChannel } from '../../reducers/channelsReducer';
import { SET_PRIVATE } from '../../reducers/channelActions'
import { SET_VU_LEVEL, SET_CHANNEL_LABEL } from '../../reducers/faderActions'
import { SOCKET_SET_VU } from '../../constants/SOCKET_IO_DISPATCHERS';
import { logger } from '../logger'

interface CommandChannelMap {
Expand Down Expand Up @@ -100,10 +102,15 @@ export class CasparCGConnection {
store.dispatch({
type: SET_VU_LEVEL,
channel: index,
// CCG returns "produced" audio levels, before the Volume mixer transform
// We therefore want to premultiply this to show useful information about audio levels
level: Math.min(1, message.args[0] * state.faders[0].fader[index].faderLevel)
level: message.args[0]
});
socketServer.emit(
SOCKET_SET_VU,
{
faderIndex: index,
level: message.args[0]
}
)
} else if (this.mixerProtocol.sourceOptions) {
const m = message.address.split('/');

Expand Down Expand Up @@ -237,7 +244,7 @@ export class CasparCGConnection {
undefined,
undefined,
value);
case 'layer-route':
case 'layer-producer':
return this.connection.playRoute(
channel,
layer,
Expand Down

0 comments on commit c47c3b8

Please sign in to comment.