/**
* Static functions for controlling underlying jamClient mixer
* functions.
*/
(function(context, $) {

    /**
    * We'll want to move control over mixer functions out of the session.js
    * file and into here, as it is becoming apparent we'll need better
    * audio control globally.
    */

    "use strict";

    context.JK = context.JK || {};

    context.JK.Mixer = {

        /**
        * Fill the track volume object, given a controlState structure.
        * Provide a boolean for broadcast indicating whether the change
        * should go out over the network
        */
        fillTrackVolume: function(controlState, broadcast) {
            context.trackVolumeObject.clientID = controlState.client_id;
            context.trackVolumeObject.broadcast = broadcast;
            context.trackVolumeObject.master = controlState.master;
            context.trackVolumeObject.monitor = controlState.monitor;
            context.trackVolumeObject.mute = controlState.mute;
            context.trackVolumeObject.name = controlState.name;
            context.trackVolumeObject.record = controlState.record;
            context.trackVolumeObject.volL = controlState.volume_left;
            context.trackVolumeObject.volR = controlState.volume_right;
            // trackVolumeObject doesn't have a place for range min/max
            //currentMixerRangeMin = mixer.range_low;
            //currentMixerRangeMax = mixer.range_high;
        }

    };

})(window, jQuery);