Home > Java > javaTutorial > body text

Can Java Sound Play MP3 Files?

Patricia Arquette
Release: 2024-10-24 05:42:30
Original
701 people have browsed it

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.

The above is the detailed content of Can Java Sound Play MP3 Files?. For more information, please follow other related articles on the PHP Chinese website!

source:php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!