Code example for SourceDataLine

Methods: stopclose

0
        // Trigger audio stop 
        this.isPlaying = false;
         
        // Kill the connection to hardware audio line 
        if (this.dataLine != null) {
            this.dataLine.stop();
            this.dataLine.close();
            this.dataLine = null;
        } 
    } 
     
    /** 
     * Thread safe call to check if the audio is currently playing sound.  
     * @return True if audio is currently playing 
     */ 
    public synchronized boolean isPlaying() { 
        return this.isPlaying;
    } 
     
    /**