@ SuppressWarnings ( "resource" ) private static SourceDataLine getDataLine ( AudioInputStream input ) throws IOException { final AudioFormat format = input . getFormat ( ) ; try { final SourceDataLine dataLine ; if ( WavFormat . mixer != null ) { dataLine = AudioSystem . getSourceDataLine ( format , WavFormat . mixer ) ; } else { dataLine = AudioSystem . getSourceDataLine ( format ) ; } dataLine . open ( format ) ; return dataLine ; } catch ( final LineUnavailableException exception ) { throw new IOException ( exception ) ; } }
Get the audio data line .