void Channel_ChangeEvent(SoundWebChannel channel, SoundWebChannelEventArgs args)
 {
     if (args.EventType == SoundWebChannelEventType.MuteChange)
     {
         this.Feedback = channel.Mute;
     }
 }
예제 #2
0
 /// <summary>
 /// Control level
 /// </summary>
 /// <param name="analogFeedbackJoin">Analog feedback join to level</param>
 /// <param name="analogTouchJoin">Analog touch join from level</param>
 /// <param name="channel">The mixer channel for the soundweb to follow</param>
 /// <param name="gainMin">Value from -280617 to 100000</param>
 /// <param name="gainMax">Value from -280617 to 100000</param>
 /// <remarks>-100000 to 100000 = -10dB to +10dB, values below -100000 are log scaled down to -80dB
 /// -160204 is -20dB
 /// </remarks>
 public SoundWebChannelUILevel(UShortInputSig analogFeedbackJoin, UShortOutputSig analogTouchJoin,
                               SoundWebChannel channel, int gainMin, int gainMax)
     : base(analogFeedbackJoin, analogTouchJoin)
 {
     this.Channel = channel;
     if (gainMin >= -280617 && gainMin <= 100000)
     {
         this.GainMinValue = gainMin;
     }
     else
     {
         this.GainMinValue = -280617;
     }
     if (gainMax >= -280617 && gainMax <= 100000)
     {
         this.GainMaxValue = gainMax;
     }
     else
     {
         this.GainMaxValue = 100000;
     }
     this.Channel.ChangeEvent += new SoundWebChannelEventHandler(Channel_ChangeEvent);
     this.Channel.Owner.Device.Socket.SocketConnectionEvent += new UXLib.Sockets.SimpleClientSocketConnectionEventHandler(Socket_SocketConnectionEvent);
     if (this.Channel.Owner.Device.Socket.Connected)
     {
         Channel.Subscribe(SoundWebChannelParamType.Gain);
     }
 }
예제 #3
0
 void Channel_ChangeEvent(SoundWebChannel channel, SoundWebChannelEventArgs args)
 {
     if (args.EventType == SoundWebChannelEventType.GainChange)
     {
         if (channel.Gain <= this.GainMinValue)
         {
             this.AnalogFeedbackValue = this.LevelMinimumValue;
         }
         else if (channel.Gain >= this.GainMaxValue)
         {
             this.AnalogFeedbackValue = this.LevelMaximumValue;
         }
         else
         {
             this.SetLevel(channel.Gain, this.GainMinValue, this.GainMaxValue);
         }
     }
 }
 public SoundWebChannelUIMuteButton(BoolOutputSig pressDigitalJoin, BoolInputSig feedbackDigitalJoin,
                                    BoolInputSig enableDigitalJoin, BoolInputSig visibleDigitalJoin, SoundWebChannel channel)
     : base(pressDigitalJoin, feedbackDigitalJoin, enableDigitalJoin, visibleDigitalJoin)
 {
     this.Channel              = channel;
     this.Channel.ChangeEvent += new SoundWebChannelEventHandler(Channel_ChangeEvent);
     this.Channel.Owner.Device.Socket.SocketConnectionEvent += new UXLib.Sockets.SimpleClientSocketConnectionEventHandler(Socket_SocketConnectionEvent);
     if (this.Channel.Owner.Device.Socket.Connected)
     {
         Channel.Subscribe(SoundWebChannelParamType.Mute);
     }
 }