title: Program returning "could not get audio input stream from input file" for specific .WAV file
body: <p>I have a program that involves the analysis and output of .wav files. It works perfectly fine with tracks from cds or the internet but I have generated a sequence of pure sine wave tones using matlab to analyse and it is giving me the error shown in the title. The matlab files run fine in iTunes so I'm not sure why my program is having trouble with it.</p>
  
  <pre><code>public static void signalToFile(File f) throws IOException, UnsupportedAudioFileException
  {
      AudioInputStream inputStream = AudioSystem.getAudioInputStream(f);
      int numBytes = inputStream.available();
      byte[] buffer = new byte[numBytes];
      inputStream.read(buffer, 0, numBytes);
  
      String newFile = f.getName().replace(".wav", ".txt");
      System.out.println("Beginning file write: " + newFile + " (soundUtilities)");
      BufferedWriter fileOut = new BufferedWriter(new FileWriter(new File("src/examples/Media/" + newFile)));
      System.out.println("Ending file write: " + newFile + " (soundUtilities)");
      System.out.println(buffer.length);
      ByteBuffer myBB = ByteBuffer.wrap(buffer);
      myBB.order(ByteOrder.LITTLE_ENDIAN);
      while(myBB.remaining() &gt; 1)
      {
          short current = myBB.getShort();
          fileOut.write(String.valueOf(current));
          fileOut.newLine();
      }
  
      fileOut.flush();
      fileOut.close();
      inputStream.close();
  }
  </code></pre>
  
  <p>The first line of this method is what is causing the error. This method involves the signal information for the file to a txt file. Any help would be greatly appreciated.</p>
  
  <p>Below is the small section of matlab code I used to create the wav file:</p>
  
  <pre><code>x13 = sin(2*pi*220*t1); % A3 long sample
  x13envelope = [1:-1/length(x13):1/length(x13)];
  x13full = x13.*x13envelope;
  
  totalSound = [x1full x2full x3full x4full x5full x6full x7full x8full x9full x10full x11full x12full x13full]; % combines the notes
  
   wavwrite(totalSound, fs, 32, 'TestTune');
  </code></pre>
  
  <p>Each of the entries in the "totalSound" array represent a note </p>