title: How to play sound in Java if I know the exact format of the audio file and need to play it repeatedly?
body: <p>I know there is <a href="https://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/AudioSystem.html#getAudioInputStream(javax.sound.sampled.AudioFormat,%20javax.sound.sampled.AudioInputStream)" rel="nofollow">this method</a> but the documentation says that the file will be converted to the target format. I don't want to convert anything nor do I want the JRE to "try" and determine the audio format each time the audio file is played. How can I play audio file without this overhead? By the way, the file is a <code>.wav</code>.</p>