public AudioServer(String [] args) {
        isRunning = true; isPlaying = true;

        /* Check port exists */
        if (args.length < 1) {
            System.out.println("Usage: ChatServerMain <port>");
            System.exit(1);
        }

        /* Create the server socket */
        try {
            serverSocket = new ServerSocket(Integer.parseInt(args[0]));
            System.out.println(serverSocket); //debug
        } catch (IOException e) {
            System.out.println("IOException: " + e);
            System.exit(1);
        }
        System.out.println("1");
        /* In the main thread, continuously listen for new clients and spin off threads for them. */
        while (isRunning) {
            try {
                System.out.println("2");
                /* Get a new client */
                clientSocket = serverSocket.accept();
                System.out.println("New connection from "+clientSocket.getInetAddress().toString());
                /* Create a thread for it and start, giving it the right id. */
                //clientThread.start();
                
                playSound();

            } catch (IOException e) {
                System.out.println("Accept failed: " + e);
                System.out.println("Server has stopped running.");
                System.exit(1);
            }
        }
        System.out.println("Server has stopped running.");
    }