title: How to get byte data from audio file (must be as signed int / bytes) in Flutter/Dart like AudioInputStream gives you in java
body: <p>Good day. I'm trying to create a music identification app (like Shazam) in Flutter (I'm also new to Flutter) and I want it to run on mobile and desktop. </p>
  
  <p>I have this piece of code <strong>in Java</strong> that gives me back a byte array with the time domain values in it :</p>
  
  <pre class="lang-java prettyprint-override"><code>File soundFile;
  AudioInputStream audioStream;
  AudioFormat audioFormat;
  SourceDataLine sourceLine;
  int check = 0;
  byte[] songBytes;
  DataLine.Info info;
  
  soundFile = new File("./testWave.wav");
  songBytes = new byte[(int) soundFile.length()];
  audioStream = AudioSystem.getAudioInputStream(soundFile);
  audioFormat = audioStream.getFormat();
  info = new DataLine.Info(SourceDataLine.class, audioFormat);
  sourceLine = (SourceDataLine) AudioSystem.getLine(info);
  sourceLine.open(audioFormat);
  sourceLine.start();
  while (check &gt; -1) {
      check = audioStream.read(songBytes, 0, songBytes.length);
  }
  sourceLine.drain();
  sourceLine.close();
  for (int i = 0; i &lt; songBytes.length; i++) {
      System.out.println(songBytes[i]);
  }
  </code></pre>
  
  <p>I have searched and could not find any way to do this in Flutter/Dart. Can anyone please give me guidance on whats the best way of doing this in Flutter/Dart if it is possible and if not can you please advise me on the best method of doing this </p>