Esempio n. 1
0
        /// <summary>
        /// Initializes this attribute based on config values and generates subscriptions commands and adds commands to the parent's queue.
        /// </summary>
        public void Initialize(string key, QscDspLevelControlBlockConfig config)
        {
            Key     = string.Format("{0}--{1}", Parent.Key, key);
            Enabled = true;
            DeviceManager.AddDevice(this);
            if (config.IsMic)
            {
                Type = ePdtLevelTypes.microphone;
            }
            else
            {
                Type = ePdtLevelTypes.speaker;
            }

            Debug.Console(2, this, "Adding LevelControl '{0}'", Key);

            this.IsSubscribed = false;

            MuteFeedback = new BoolFeedback(() => _IsMuted);

            VolumeLevelFeedback = new IntFeedback(() => _VolumeLevel);

            VolumeUpRepeatTimer   = new CTimer(VolumeUpRepeat, Timeout.Infinite);
            VolumeDownRepeatTimer = new CTimer(VolumeDownRepeat, Timeout.Infinite);
            LevelCustomName       = config.Label;
            HasMute  = config.HasMute;
            HasLevel = config.HasLevel;
        }
Esempio n. 2
0
        //public TesiraForteLevelControl(string label, string id, int index1, int index2, bool hasMute, bool hasLevel, BiampTesiraForteDsp parent)
        //    : base(id, index1, index2, parent)
        //{
        //    Initialize(label, hasMute, hasLevel);
        //}

        public QscDspLevelControl(string key, QscDspLevelControlBlockConfig config, QscDsp parent)
            : base(config.LevelInstanceTag, config.MuteInstanceTag, parent)
        {
            if (!config.Disabled)
            {
                Initialize(key, config);
            }
        }