Java not working properly with 24 or 32 bits
805365Feb 11 2011 — edited Feb 11 2011Hello:
My app works with either 16, 24 or 32 bits. It generates several audio signals and you can either play them or save them as *.wav. It works properly with 16 bits but if I choose 24 or 32 bits it writes the wavs well but when playing writing to SourceDataLine it does weird things:
- It gives less level to the right channel at 0dbFs Stereo sine
- Writing zeros to one of the two channels don't mute that channel.
I have two sound cards and i have tried with different Mixers and different sound cards but didn't solve anything. And searching the web i found this:
http://stackoverflow.com/questions/3024622/java-playback-of-24-bit-audio-is-incorrect
which is exactly what happens to me. I only use java sound api but need to solve this.
Any help?
Thanks once again.