Пример #1
0
 /// <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;
 }
Пример #2
0
 public UdpSocket(IPEndPoint host, IMumbleProtocol protocol, MumbleConnection connection)
 {
     _host       = host;
     _protocol   = protocol;
     _connection = connection;
     _client     = new UdpClient();
 }
Пример #3
0
 public Channel(IMumbleProtocol owner, uint id, string name, uint parent)
 {
     Owner  = owner;
     Id     = id;
     Name   = name;
     Parent = parent;
 }
Пример #4
0
 /// <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;
 }
Пример #5
0
        public MicrophoneRecorder(IMumbleProtocol protocol)
        {
            _protocol = protocol;
            var sourceStream = new WaveInEvent
            {
                WaveFormat = new WaveFormat(48000, 1)
            };
            sourceStream.DataAvailable += VoiceDataAvailable;

            sourceStream.StartRecording();
        }
Пример #6
0
        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 MicrophoneRecorder(IMumbleProtocol protocol)
        {
            _protocol = protocol;
            var sourceStream = new WaveInEvent
            {
                WaveFormat = new WaveFormat(48000, 1)
            };

            sourceStream.DataAvailable += VoiceDataAvailable;

            sourceStream.StartRecording();
        }
Пример #8
0
 public User(IMumbleProtocol owner, uint id)
 {
     _owner = owner;
     Id     = id;
 }
        public MicrophoneRecorder(IMumbleProtocol protocol)
        {
            _protocol = protocol;

            int totalDevices = WaveIn.DeviceCount;
        }
Пример #10
0
 public MicrophoneRecorder(IMumbleProtocol protocol)
 {
     VoiceDetectionThreshold = 0.5f;
     _protocol = protocol;
 }
Пример #11
0
 /// <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;
 }
Пример #12
0
 /// <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)
 {
 }
Пример #13
0
        public MicrophoneRecorder(IMumbleProtocol protocol)
        {
            _protocol = protocol;

            int totalDevices = WaveIn.DeviceCount;
        }