@Override
    public void run(){
        stop = false;
        play = true;
        line.start();
        while (!end){
            
            if (play){
                try {
                    while (((bytesRead = audioInputStream.read(bytes, 0, bytes.length)) != -1) && !stop && play) {
                        this.adjustVolume();
                        line.write(bytes, 0, bytesRead);
                    }
                    if(bytesRead == -1){
                        if(isLooping()){
                            this.RESTART();
                            this.START();
                        }else{
                            this.STOP();
                        }
                    }
                } catch (IOException ex) {}
            }
            else{
                try {
                    Thread.sleep(99);
                } catch (InterruptedException ex) {}
            }
        }
        
    }