Java Sound does not support MP3 by default. For types it does support in a specific JRE, check AudioSystem.getAudioFileTypes().
There's a way to add MP3 support. Add the JMF based mp3plugin.jar to your project's run-time class-path.
While a javax.sound.sampled.Clip seems ideal, it can only contain a second of 16-bit stereo sound at a 44.1KHz sampling rate. A alternative is BigClip, which can handle audio of arbitrary size.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3