On Tue, 13 May 2025 19:45:48 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> 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;
>
> or maybe inject all these simple methods into `javax.sound.sampled.Clip` or 
> its subclass/superclass.

> Can we gain any benefits by using Path instead?

You had mentioned that and I looked but I didn't see any compelling reason.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24991#discussion_r2087621643

Reply via email to