using System.Collections.Generic;
namespace Adrenak.UniVoice {
public class VoiceSettings {
///
/// If true, we don't want to listen to any peer
///
public bool muteAll;
///
/// The peers we don't want to listen to
///
public List mutedPeers = new List();
///
/// If true, we don't want any peer to listen to us
///
public bool deafenAll;
///
/// The peers we don't want listening to us
///
public List deafenedPeers = new List();
///
/// Sets the deaf status of a peer
///
public void SetDeaf(int peerId, bool state) {
if(state) {
if (!deafenedPeers.Contains(peerId))
deafenedPeers.Add(peerId);
}
else {
if (deafenedPeers.Contains(peerId))
deafenedPeers.Remove(peerId);
}
}
///
/// Sets the mute status of a peer
///
public void SetMute(int peerId, bool state) {
if (state) {
if (!mutedPeers.Contains(peerId))
mutedPeers.Add(peerId);
}
else {
if (mutedPeers.Contains(peerId))
mutedPeers.Remove(peerId);
}
}
}
}