Package edu.purdue.wind

Examples of edu.purdue.wind.Wave.channels()


      wave = Wave.readFile(args[0]);
  } catch (IOException e) {
      throw new RuntimeException(e);
  }

  if (wave.channels() != 2) {
      System.err.println("Stereo input data required");
      System.exit(1);
  }

  int nSamples = 0;
View Full Code Here


      throw new RuntimeException(e);
  }

  System.out.println("Bits per sample:   " + wave.sampleBits());
  System.out.println("Sample rate (Hz):  " + wave.sampleRate());
  System.out.println("Channels:          " + wave.channels());
  System.out.println("Number of samples: " + wave.samples());
    }
}
View Full Code Here

  } catch (IOException e) {
      throw new RuntimeException(e);
  }

  short channel = Short.parseShort(args[1]);
  if (channel >= wave.channels()) {
      System.err.println("Cannot request channel not present in file");
      System.exit(1);
  }

  // Find the highest power of two smaller than wave.samples(),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.