public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GCJ ------ file type not supported by system
@ 2014-08-29  8:00 kgy
  2014-08-29  8:07 ` Fwd: " Andrew Haley
  0 siblings, 1 reply; 31+ messages in thread
From: kgy @ 2014-08-29  8:00 UTC (permalink / raw)
  To: GCJ

>> 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


^ permalink raw reply	[flat|nested] 31+ messages in thread
* GCJ ------ file type not supported by system
@ 2014-08-28 14:30 kgy
  2014-08-28 15:30 ` Bodo Thiesen
  0 siblings, 1 reply; 31+ messages in thread
From: kgy @ 2014-08-28 14:30 UTC (permalink / raw)
  To: GCJ

Hello,

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".  This parameter 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


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2014-09-05  9:39 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29  8:00 GCJ ------ file type not supported by system kgy
2014-08-29  8:07 ` Fwd: " Andrew Haley
2014-08-29  8:34   ` Mario Torre
2014-08-29  9:47   ` Guillermo Rodriguez Garcia
2014-08-29  9:57     ` Mario Torre
2014-08-29 10:00       ` Guillermo Rodriguez Garcia
2014-09-01  9:03         ` Andrew Haley
2014-09-01  9:32           ` Guillermo Rodriguez Garcia
2014-09-01 10:47             ` Mario Torre
2014-09-03 16:12               ` Guillermo Rodriguez Garcia
2014-09-03 16:30                 ` Andrew Haley
2014-09-03 16:35                   ` Guillermo Rodriguez Garcia
2014-09-03 17:11                     ` Andrew Haley
2014-09-03 17:31                       ` Guillermo Rodriguez Garcia
2014-09-03 18:00                         ` Mark Wielaard
2014-09-03 19:00                           ` Guillermo Rodriguez Garcia
2014-09-03 17:59                     ` Per Bothner
2014-09-03 18:06                       ` Mark Wielaard
2014-09-04  8:14                       ` Andrew Haley
2014-09-04 20:37                         ` Per Bothner
2014-09-04 12:14                 ` Andïï
2014-09-04 16:17                   ` Guillermo Rodriguez
2014-09-04 18:54                     ` Pekka Enberg
     [not found]                       ` <CABDcavbXxFiqTenZm0DJ8MhT5TLOgiMDhGArRjB5wpuTzG7c-g@mail.gmail.com>
2014-09-04 20:07                         ` Pekka Enberg
2014-09-04 20:15                           ` Andrew Haley
2014-09-04 20:43                             ` Pekka Enberg
2014-09-04 21:35                     ` Mark Wielaard
2014-09-05  9:38                     ` Mario Torre
2014-09-05  9:39                     ` Mario Torre
  -- strict thread matches above, loose matches on Subject: below --
2014-08-28 14:30 kgy
2014-08-28 15:30 ` Bodo Thiesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).