mfsampledsp
mfsampledsp copied to clipboard
Play from memory
I need to play a MP3 that comes from a byte[].
I got an error when I tryed that:
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input stream
I assume you wrap the byte
array into a ByteArrayInputStream
?
Decoding from arbitrary streams is currently not supported.
Try dumping the byte
array to a file with the extension .mp3
and then open that using AudioSystem
.