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; } } }
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); }
public void Subscribe(SoundWebChannelParamType paramType) { Owner.Subscribe(); Send("\x89", paramType, "\x00\x00\x00\x00"); }
public virtual void Send(string messageType, SoundWebChannelParamType paramType, string value) { }