0

There is a number of methods of playing mp3 in Java (I found them here on Stackoverflow); but it looks like they all work only for relatively long mp3s, and the first second (I'd rather say first three seconds) are not played. If the mp3 is one second or less, there is no sound.

My current workaround is to convert mp3 to wav, and the short wav-s are played ok.

I use Java 17, Linux 5.15.0-48-generic, Ubuntu 20.04.4 LTS focal

Did anyone encounter this issue? Is it possible to play short mp3-s?

18446744073709551615
  • 16,368
  • 4
  • 94
  • 127
  • You can use JavaFX for that, it is really simple. Check this thread: https://stackoverflow.com/questions/6045384/playing-mp3-and-wav-in-java – notAPPP Sep 30 '22 at 22:16

0 Answers0