Class WavFileInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public class WavFileInputStream extends AudioInputStream
Wav file input stream which will work for large wav files (>2 Gigabytes) which fail with the standard JAva classes since the data chunk size gets read as a signed integer which then ends up invalid input: '<' 0.

This class should work with files of up to 4 Gigabytes (or 2^32 bytes). The only exception would be mono 8 bit files. This is because various parts of the super class (e.g. the available() function) use int for a sample number variable. With stereo or 16 bit files, the sample number can never exceed 2^31, since will be half or a quarter of the overall file size (minus the header). However, for mono 8 bit files, the sample number can still reach almost 2^32 which will mess up any parts of the code using a 32 bit sample number.

Author:
Doug Gillespie