834835836837838839840841842843844
total += numBytesRead; line.write(myData, 0, numBytesRead); } }catch(Exception e) {} line.drain(); line.stop(); } }.start(); return line;
389390391392393394395396397398399
* by prematurely closing the line and exiting the VM.) * * Thanks to Margie Fitch for bringing me on the right path to this * solution. */ line.drain(); /* * All data are played. We can close the shop. */ line.close();
135136137138139140141142143144145
} // release all audio resources targetDataLine.drain(); targetDataLine.close(); sourceDataLine.drain(); sourceDataLine.close(); } } }
119120121122123124125126127128129
} } catch (final IOException e) { e.printStackTrace(); return; } finally { auline.drain(); auline.close(); } } }
90919293949596979899100
nBytesWritten = line.write(data, 0, nBytesRead); } } // Stop line.drain(); line.stop(); line.close(); din.close(); }
7475767778798081828384
} } // Stop line.drain(); line.stop(); line.close(); din.close(); //96515374 }
138139140141142143144145146147148
{ nBytesRead = din.read(data, 0, data.length); if (nBytesRead != -1) nBytesWritten = line.write(data, 0, nBytesRead); } // Stop line.drain(); line.stop(); line.close(); din.close(); } }
150151152153154155156157158159160
7273747576777879808182
if (nBytesRead >= 0) { auline.write(abData, 0, nBytesRead); } } auline.drain(); } catch (Exception e) { e.printStackTrace(); } finally { if (auline != null) try { auline.close(); } catch (Exception e1) { }
} } catch (IOException e) { e.printStackTrace(); return; } finally { auline.drain(); auline.close(); } } }