fix(desktop): decode mp3 to pcm before opening the audio line
MP3SPI returns a stream whose format is MPEG1L3, and AudioSystem.getLine was asked for a SourceDataLine supporting that compressed format. Java Sound has no such line, so playback failed with "No line matching interface SourceDataLine supporting format MPEG1L3 ...". Convert the decoded stream to 16-bit signed PCM at the source sample rate before opening the line, which is the format the mixer actually supports. Add a regression test with a one-second MP3 fixture that asserts the decoded format is PCM_SIGNED before the line is opened.
This commit is contained in:
1 parent
8f94bb18e7
commit
f8953fb200
3 files changed
+72
-1
No files matched your search
Binary file not shown.
Reference in new issue
Block a user