예제 #1
0
 internal DiscordGoLiveSession(DiscordVoiceSession parentSession, ulong?guildId, ulong channelId, GoLiveCreate goLive) : base(parentSession.Client, guildId, channelId, goLive.SessionId)
 {
     ReceivePackets = false; // we don't have any parsers yet so we might as well not get the packets
     _rtcServerId   = goLive.RtcServerId;
     StreamKey      = goLive.StreamKey;
     Update(goLive);
     ParentSession = parentSession;
 }
예제 #2
0
        internal DiscordVoiceSession(DiscordVoiceSession other) : base(other)
        {
            other.OnConnected        = null;
            other.OnDisconnected     = null;
            other.OnUserConnected    = null;
            other.OnUserSpeaking     = null;
            other.OnUserDisconnected = null;
            other.OnChannelChanged   = null;

            Initialize();
        }
예제 #3
0
 public IncomingVoiceStream(DiscordVoiceSession session, ulong userId)
 {
     _packets = new ConcurrentQueue <DiscordVoicePacket>();
     Session  = session;
     UserId   = userId;
 }
예제 #4
0
 internal DiscordVoiceStream(DiscordVoiceSession client, int bitrate, AudioApplication application = AudioApplication.Mixed)
 {
     Session   = client;
     _encoder  = new OpusEncoder(bitrate, application, 5);
     _nextTick = -1;
 }