diff --git a/app/assets/images/content/icon_mute.png b/app/assets/images/content/icon_mute.png index 379613303..a14155706 100644 Binary files a/app/assets/images/content/icon_mute.png and b/app/assets/images/content/icon_mute.png differ diff --git a/app/assets/javascripts/fakeJamClient.js b/app/assets/javascripts/fakeJamClient.js index 0ad7934d2..fd3ab5171 100644 --- a/app/assets/javascripts/fakeJamClient.js +++ b/app/assets/javascripts/fakeJamClient.js @@ -79,7 +79,8 @@ function SessionGetControlState(mixerIds) { var response = []; for (var i=0; i 10 || vuValue < -70) { vuChange = vuChange * -1; } } diff --git a/app/assets/javascripts/session.js b/app/assets/javascripts/session.js index 63ca82f23..d627f6b44 100644 --- a/app/assets/javascripts/session.js +++ b/app/assets/javascripts/session.js @@ -92,26 +92,36 @@ // Get the latest list of underlying audio mixer channels function _updateMixers() { - mixers = context.jamClient.SessionGetIDs(); + var mixerIds = context.jamClient.SessionGetIDs(); + mixers = context.jamClient.SessionGetControlState(mixerIds); + logger.debug("Mixers updated:"); + logger.debug(mixers); } // Given a clientId, return a dictionary of mixer ids which // correspond to that client's tracks // TODO - this is hard-coded. Need fix from Nat - function _mixersForTrack(clientId) { - return { - left: "FW AP Multi_2_10200.l", - right: "FW AP Multi_2_10200.r" - }; + function _inputMixerForClient(clientId) { + // Iterate over the mixers, but simply return the first + // mixer in the AudioInputMusicGroup + var mixer = null; + for (var i=0; i= lights) { state = 'off'; } - selector = '.session-mytracks table[mixer-id="' + mixerId + '"] td.vu' + i; + selector = '#tracks table[mixer-id="' + mixerId + '"] td.vu' + i; $light = $(selector); $light.addClass(colorClass + state); } @@ -211,11 +222,15 @@ // value is a DB value from -80 to 20. Convert to float from 0.0-1.0 vuVal = (value + 80) / 100; if (eventName === 'left_vu') { - mixerId = mixerId + ".l"; + mixerId = mixerId + "_vul"; } else { - mixerId = mixerId + ".r"; + mixerId = mixerId + "_vur"; } _updateVU(mixerId, vuVal); + } else { + // Examples of other events + // Add media file track: "add", "The_Abyss_4T", 0 + logger.debug('non-vu event: ' + eventName + ',' + mixerId + ',' + value); } } } @@ -232,8 +247,45 @@ } } + function _toggleVisualMuteControl($control, muting) { + if (muting) { + $control.removeClass('enabled'); + $control.addClass('muted'); + } else { + $control.removeClass('muted'); + $control.addClass('enabled'); + } + } + + function _toggleAudioMute(mixerId, muting) { + // 'fill' the trackVolume object volumes from what's in the + // corresponding mixer. + var mixer = null; + for (var i=0; i +
@@ -52,15 +53,16 @@
+