/// <summary> /// Constructs a new audio source. /// </summary> /// <param name="name"></param> /// <param name="sourceId">If sourceId < 0, the audio source is local.</param> public AudioSource(string name, int sourceId, int ownerId, bool isMuted, AudioCodecArgs args) { if (name == null) { throw new ArgumentNullException("name"); } if (args == null) { throw new ArgumentNullException("args"); } if (sourceId == 0) { throw new ArgumentOutOfRangeException("sourceId"); } if (sourceId > 0 && ownerId == 0) { throw new ArgumentException("ownerId"); } Name = name; Id = sourceId; OwnerId = ownerId; IsMuted = isMuted; CodecSettings = args; }
public void Deserialize(ISerializationContext context, IValueReader reader) { Name = reader.ReadString(); Id = reader.ReadInt32(); OwnerId = reader.ReadInt32(); IsMuted = reader.ReadBool(); CodecSettings = new AudioCodecArgs(context, reader); }
public AudioCodec(AudioCodecArgs args) { if (args == null) { throw new ArgumentNullException("args"); } this.settings = args; }
internal AudioSource(string name, int sourceId, int ownerId, AudioCodecArgs args) : this(name, sourceId, ownerId, false, args) { }