/** * @(#)testWav.java 1.00 12/30/2002 * * Copyright 1996-2003 Sinotar Software Group. All Rights Reserved. * * Proprietary and Confidential * * This software is the proprietary information of Sinotar Software Group. * * Disclosure outside Sinotar Software Group is prohibited except by license * agreement or other confidentiality agreement. * * Disclaimer of Warranty. Software is provided "AS IS," without a warranty * of any kind. ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. * * Support: http://www.sinotar.com/support * */ import java.io.*; import java.util.*; import com.sinotar.sound.Wav; /** * To run this example, make sure you have a test.wav file in the current directory. */ public class testWav { public static void main(String[] argv) { try { System.out.println("Parsing test.wav ..."); Wav wav = Wav.parse("test.wav"); System.out.println("\tBlock Align: " + wav.getBlockAlign()); System.out.println("\tAverage Bytes Per Second: " + wav.getAvgBytesPerSec()); System.out.println("\tChunk Size: " + wav.getChunkSize()); System.out.println("\tChannels: " + wav.getChannels()); System.out.println("\tFormat Tag: " + wav.getFormatTag()); System.out.println("\tSamples Per Second: " + wav.getSamplesPerSec()); System.out.println("\tChannels: " + wav.getChannels()); System.out.println("\tBits Per Sample: " + wav.getBitsPerSample()); System.out.println("Save this Wav object to a different file: test_generated.wav"); wav.write("test_generated.wav"); } catch(Exception e) { e.printStackTrace(); } } }