"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Can Java Sound Play MP3 Files?

Can Java Sound Play MP3 Files?

Published on 2024-11-09
Browse:363

Can Java Sound Play MP3 Files?

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.

Release Statement This article is reprinted at: 1729689811 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

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