Пример #1
0
        void Mixer_FeedbackReceived(SoundWebObject soundWebObject, SoundWebObjectFeedbackEventArgs args)
        {
            uint channel = GetChannelFromParamID(args.ParamID);
            SoundWebChannelParamType channelControlType = GetSoundWebChannelParamType(args.ParamID);

            if (channel == this.Index)
            {
                switch (channelControlType)
                {
                case SoundWebChannelParamType.Gain:
                    _gain = args.Value;
                    if (ChangeEvent != null)
                    {
                        ChangeEvent(this, new SoundWebChannelEventArgs(SoundWebChannelEventType.GainChange));
                    }
                    break;

                case SoundWebChannelParamType.Mute:
                    if (args.Value == 1)
                    {
                        _mute = true;
                    }
                    else
                    {
                        _mute = false;
                    }
                    if (ChangeEvent != null)
                    {
                        ChangeEvent(this, new SoundWebChannelEventArgs(SoundWebChannelEventType.MuteChange));
                    }
                    break;
                }
            }
        }
Пример #2
0
        public override void Send(string messageType, SoundWebChannelParamType paramType, string value)
        {
            ushort pVal  = Convert.ToUInt16(((this.Index - 1) * 100) + (int)paramType);
            byte   upper = (byte)(pVal >> 8);
            byte   lower = (byte)(pVal & 0xff);

            this.Owner.Send(messageType, string.Format("{0}{1}", (char)upper, (char)lower), value);
        }
Пример #3
0
 public void Subscribe(SoundWebChannelParamType paramType)
 {
     Owner.Subscribe();
     Send("\x89", paramType, "\x00\x00\x00\x00");
 }
Пример #4
0
 public virtual void Send(string messageType, SoundWebChannelParamType paramType, string value)
 {
 }