Example #1
0
        private void ServerInit()
        {
            // MAKE LOOPS
            for (int i = 0; i < numLoops; i++)
            {
                loops.Add(new Loop(serverSampleRate, serverChannels));
            }

            // START THE UDP-LISTENER
            udpServer = new UdpListener();
            StartListening();

            // SET UP THE CMD-EXECUTIVE
            CMD.ServerInit(clients, udpServer, loops);

            // SET UP AUDIO


            // START THE SERVER
            Thread serverMainThread = new Thread(ServerMain);

            serverMainThread.Priority = ThreadPriority.AboveNormal;
            serverMainThread.Start();

            // START THE STATUS TIMER
            statusTimer          = new System.Windows.Forms.Timer();
            statusTimer.Interval = 250;
            statusTimer.Tick    += statusTimerTick;
            statusTimer.Start();
        }
Example #2
0
 static public void ServerInit(Dictionary <string, Client> clientList, UdpListener server, List <Loop> serverLoops)
 {
     clients   = clientList;
     loops     = serverLoops;
     UdpServer = server;
 }