Code example for SourceDataLine

Methods: stopclose

0
        //close our IO streams 
       FileUtils.close(encodedAudioInputStream);
       FileUtils.close(audioInputStream);
 
        if (sourceDataLine != null) {
            sourceDataLine.stop();
            sourceDataLine.close();
        } 
    } 
     
    /** 
     * Returns Gain value. 
     */ 
    public float getGainValue() { 
        if (hasGainControl()) { 
            return gainControl.getValue();
        } else { 
            return 0.0F; 
        } 
    }