示例#1
0
        public static void Request(this IClientSourceHandler self, string name, AudioFormat format, short frameSize)
        {
            if (self == null)
            {
                throw new ArgumentNullException("self");
            }

            self.Request(name, format, frameSize, 0);
        }
示例#2
0
        private void Setup(IClientConnection connection, IAudioEngine audioEngine, IClientUserHandler userHandler, IClientSourceHandler sourceHandler, ClientChannelManager channelManager)
        {
            this.client               = new TempestClient(connection, MessageTypes.All);
            this.client.Connected    += OnClientConnected;
            this.client.Disconnected += OnClientDisconnected;

            this.CurrentUser = new CurrentUser(this);

            this.Audio    = (audioEngine ?? new AudioEngine());
            this.Users    = (userHandler ?? new ClientUserHandler(this, new ClientUserManager()));
            this.Sources  = (sourceHandler ?? new ClientSourceHandler(this, new ClientSourceManager(this)));
            this.Channels = (channelManager ?? new ClientChannelManager(this));

            this.RegisterMessageHandler <PermissionDeniedMessage> (OnPermissionDeniedMessage);
            this.RegisterMessageHandler <RedirectMessage> (OnRedirectMessage);
            this.RegisterMessageHandler <ServerInfoMessage> (OnServerInfoReceivedMessage);
            //this.RegisterMessageHandler<ConnectionRejectedMessage> (OnConnectionRejectedMessage);
            this.RegisterMessageHandler <DisconnectMessage> (OnDisconnectedMessage);
        }