getAudioInputStream can not convert [stereo, 4 bytes/frame] stream to [mono, 2 bytes/frame]
- by brian_d
Hello.
I am using javasound and have an AudioInputStream of format
PCM_SIGNED 8000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
Using AudioSystem.getAudioInputStream(target_format, original_stream) produces an 'IllegalArgumentException: Unsupported Conversion' when the target_format is PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
Is it possible to convert this stream manually after every read() call? And if yes, how?
In general, how can you compare two formats and tell if a conversion is possible?