Code example for SourceDataLine

Methods: isRunningstart

0
    /** 
     * Prior to writing to a new or stopped sourceDataLine, the dataLine needs to 
     * be opened. 
     */ 
    public void startSourceDataLine(){ 
        if( sourceDataLine != null && !sourceDataLine.isRunning())
            sourceDataLine.start();
    } 
     
    /** 
     * Stops the current sourceDataLine from writing. This should be called when the  
     * stream has been paused with intent to reopen it. 
     */ 
    public void stopSourceDataLine(){ 
        if( sourceDataLine != null && sourceDataLine.isRunning()){
            sourceDataLine.flush();
            sourceDataLine.stop();
        } 
    } 
     
Experience pair programming with AI  Get Codota for Java