Code example for SourceDataLine

Methods: drainclose

0
     
    public void close() { 
    	try { 
	        if (mLine != null) {
	        	// Wait for the line to finish playing 
	        	mLine.drain();
	        	mLine.close();
	        	mLine = null;
	        }         
	        if (audioCoder != null) {
	        	audioCoder.close();
	        	audioCoder = null;
	        } 
	        if (container !=null) {
	        	container.close();
	        	container = null;
	        } 
    	} catch (Error e) {
    		log.error("close(): Error=" + e);
    	} catch (Exception e) {
Experience pair programming with AI  Get Codota for Java