/// <summary> /// Creates a connection to the server /// </summary> /// <param name="host"></param> /// <param name="protocol"></param> /// <param name="voiceSupport">Whether or not voice support is unabled with this connection.</param> public MumbleConnection(IPEndPoint host, IMumbleProtocol protocol, bool voiceSupport = true) { Host = host; State = ConnectionStates.Disconnected; Protocol = protocol; VoiceSupportEnabled = voiceSupport; }
public UdpSocket(IPEndPoint host, IMumbleProtocol protocol, MumbleConnection connection) { _host = host; _protocol = protocol; _connection = connection; _client = new UdpClient(); }
public Channel(IMumbleProtocol owner, uint id, string name, uint parent) { Owner = owner; Id = id; Name = name; Parent = parent; }
/// <summary>Initializes a new instance of the <see cref="User"/> class.</summary> /// <param name="owner">The mumble protocol used by the User to communicate.</param> /// <param name="id">The id of the user.</param> /// <param name="audioSampleRate">The sample rate in Hertz (samples per second).</param> /// <param name="audioSampleBits">The sample bit depth.</param> /// <param name="audioSampleChannels">The sample channels (1 for mono, 2 for stereo).</param> /// <param name="audioFrameSize">Size of the frame in samples.</param> public User(IMumbleProtocol owner, uint id, int audioSampleRate = Constants.DEFAULT_AUDIO_SAMPLE_RATE, byte audioSampleBits = Constants.DEFAULT_AUDIO_SAMPLE_BITS, byte audioSampleChannels = Constants.DEFAULT_AUDIO_SAMPLE_CHANNELS, ushort audioFrameSize = Constants.DEFAULT_AUDIO_FRAME_SIZE) { _codecs = new CodecSet(audioSampleRate, audioSampleBits, audioSampleChannels, audioFrameSize); _buffer = new AudioDecodingBuffer(audioSampleRate, audioSampleBits, audioSampleChannels, audioFrameSize); _owner = owner; Id = id; }
public MicrophoneRecorder(IMumbleProtocol protocol) { _protocol = protocol; var sourceStream = new WaveInEvent { WaveFormat = new WaveFormat(48000, 1) }; sourceStream.DataAvailable += VoiceDataAvailable; sourceStream.StartRecording(); }
public MicrophoneRecorder(IMumbleProtocol protocol) { _protocol = protocol; var sourceStream = new WaveInEvent { WaveFormat = new WaveFormat(Constants.SAMPLE_RATE, Constants.SAMPLE_BITS, Constants.CHANNELS) }; sourceStream.DataAvailable += VoiceDataAvailable; sourceStream.StartRecording(); }
public User(IMumbleProtocol owner, uint id) { _owner = owner; Id = id; }
public MicrophoneRecorder(IMumbleProtocol protocol) { _protocol = protocol; int totalDevices = WaveIn.DeviceCount; }
public MicrophoneRecorder(IMumbleProtocol protocol) { VoiceDetectionThreshold = 0.5f; _protocol = protocol; }
/// <summary> /// Creates a connection to the server /// </summary> /// <param name="host"></param> /// <param name="protocol"></param> public MumbleConnection(IPEndPoint host, IMumbleProtocol protocol) { Host = host; State = ConnectionStates.Disconnected; Protocol = protocol; }
/// <summary> /// Creates a connection to the server using the given address and port. /// </summary> /// <param name="server">The server adress or IP.</param> /// <param name="port">The port the server listens to.</param> /// <param name="protocol">An object which will handle messages from the server</param> public MumbleConnection(string server, int port, IMumbleProtocol protocol) : this(new IPEndPoint(Dns.GetHostAddresses(server).First(a => a.AddressFamily == AddressFamily.InterNetwork), port), protocol) { }