On Tue, 13 May 2025 19:09:21 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8356049 > > src/java.desktop/share/classes/javax/sound/SoundClip.java line 61: > >> 59: * @throws IOException if there is an error reading from {@code file} >> 60: */ >> 61: public static SoundClip createSoundClip(File file) throws >> IOException { > > Can we gain any benefits by using Path instead? Or maybe we can add this API to AudioSystem/clip? Old code File file = new File(file); AudioInputStream audioIn = AudioSystem.getAudioInputStream(...file...); Clip clip = AudioSystem.getClip(); clip.open(audioIn); clip.start(); new code: File file = new File(file); AudioClip clip = AudioSystem.getAudioClip(...file...); clip.play()/canPlay/loop/stop; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24991#discussion_r2087508034