On Fri, 2 May 2025 23:00:32 GMT, Phil Race <p...@openjdk.org> wrote:

>> A simple API to replace java.applet.AudioClip
>> 
>> CSR is now created : https://bugs.openjdk.org/browse/JDK-8356200
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8356049

I wonder about the limitation to `java.io.File` as source for sound clips. 
Allowing playback from an `InputStream` allows developers to use their own 
packaging, compression, bundling, or use dynamically generated sound clips, and 
to work around missing file access permissions. How about this additional 
factory method:

 public static SoundClip createSoundClip(InputStream file) throws IOException;

The implementation is simple, because it boils down to an InputStream 
internally anyway, and testing is equally simple.

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

PR Comment: https://git.openjdk.org/jdk/pull/24991#issuecomment-2848551015

Reply via email to