Java AudioSystem: Reading 32 Bit Wav Files

好久不见. 提交于 2019-12-06 06:03:55

Old question, but it's something I was just looking into for myself. My tests can confirm that 16bit 48kHz PCM works, and 32bit doesn't.

However my tests also imply that 24 bit doesn't work:

 No line matching interface Clip supporting format PCM_SIGNED 48000.0 Hz, 24 bit, stereo, 6 bytes/frame, little-endian is supported.

This is a .wav file created at 96Khz, 32bit and exported from Audacity where it was rendered as a 24bit 48Khz wav.

This would seem reflected in the doc: https://docs.oracle.com/javase/8/docs/technotes/guides/sound/

"Sound formats: 8-bit and 16-bit audio data, in mono and stereo, with sample rates from 8 kHz to 48 kHz"

So, no 32 bit floating available, I'm afraid, and I cannot reproduce your result that 24 bit floating works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!