Hi!
I want to run all au files but only the ones which have the proporties below are allowed:
ulaw,8000,8,signed,big endian,mono
How can i change this state?
I suppose, ok, I use this format then...But I can't convert any file to this format.
AudioFormat newFormat = new AudioFormat(
AudioFormat.Encoding.PCM_SIGNED, 8000 8,
1,2,8000
true);
AudioInputStream newStream = AudioSystem.getAudioInputStream(newFormat, audioInputStream);
audioFormat = newFormat;
audioInputStream = newStream;
AudioSystem.write(audioInputStream,AudioFileFormat.Type.AU, fout);
The error:
java.lang.IllegalArgumentException: Unsupported conversion: ULAW 8000.0 Hz, 8 bit, mono, 2 bytes/frame, from PCM_SIGNED 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:955)
How can i solve this problem?Thanks...
Edited by: abouttechnology on Apr 7, 2008 1:56 PM
Edited by: abouttechnology on Apr 7, 2008 1:57 PM