GCJ ------ file type not supported by system
kgy
gykarsai@all.hu
Fri Aug 29 08:00:00 GMT 2014
>> I create a native exe [...] And at this point crashes the program [...]
>http://sscce.org/
>Regards, Bodo
I apologise for my trifling. I think too much on this problematic
error message, and I forgot to take notice of correct form of
requiring a support.
I create a native exe for windows by Cygvin.gcj v4.8.3.
This ended perfectally. And when I like to run, than exe
start and run to the point where I like to write to output
a sound stream with the "Audio stream with the
javax.sound.sampled.AudioSystem.write(...)" method. 2nd
parameter of this method is "AudioFileFormat.Type.WAVE".
Exactly the Java source is:
private long genSliceFeat(int featStart, int featEnd)
throws Exception
{
WaveReader reader = new WaveFileReader(audioFile);
AudioFormat format = reader.getFormat();
int framStart = ((int) (featStart * freqRatio));
int framEnd = ((int) (featEnd * freqRatio));
int frameSize = format.getFrameSize();
long pos = framStart * frameSize;
byte[] wbytes = new byte[(framEnd - framStart) * frameSize];
int read = reader.read(pos, wbytes);
ByteArrayInputStream bais = new ByteArrayInputStream(wbytes);
AudioInputStream ais = new AudioInputStream(bais, format, read /
frameSize);
AudioSystem.write(ais, AudioFileFormat.Type.WAVE, sliceWavFile);
bais.close();
ais.close();
bais = null;
ais = null;
System.gc();
return extractWave(sliceWavFile, featureFile, FRONTEND_NAME_FOR_WAVE);
}
And the error message concerns to the
"AudioFileFormat.Type.WAVE" parameter which gives the type of
output sound file. And at this point crashes the program
with the next error message:
java.lang.IllegalArgumentException: file type not supported by system
at javax.sound.sampled.AudioSystem.write(Unknown Source)
at com.all.smws.speech.SpeechFilter.genSliceFeat(Unknown Source)
at com.all.smws.speech.SpeechFilter.getAnnotations(Unknown Source)
at com.all.sndsep.segmentation.Segmentor.getNewAnnotations(Unknown
Source)
at com.all.sndsep.segmentation.Segmentor.getNewAnnotations(Unknown
Source)
at com.all.sndsep.segmentation.Segmentor.getNewAnnotations(Unknown
Source)
at com.all.sndsep.segmentation.Segmentor.getAllAnnotations(Unknown
Source)
at com.all.smws.speech.SpeechFilter.getSmwsAnnotations(Unknown Source)
at com.all.smws.speech.SMWS.getSpeech(Unknown Source)
at com.all.onins.oi.stream.OnlineInputStream.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Please, help me someone with any words about why. The command
line, which generates the exe in Cygwin
gcj -fjni -mwindows --main=com.all.onins.oi.OnlineInputStub
./Jars/sndsep.jar ./Jars/sns.jar ./Jars/smws.jar ./Jars/onins.jar -o
onins_noopt.exe
Best regards
Gyozo Karsai
from Hungary
More information about the Java
mailing list