Flagstone Software

13213. Cannot decode WAV files with odd number of bytes in data.

The FSSoundConstructor has cannot decode WAV files that contain a data block with an odd number of bytes. The specification appears to limit data blocks to an even number of bytes but if the data block is the last one in a file then an odd number of bytes may be encountered. The result is that the FSCoder object that decodes the data throws an IllegalArgumentException as the internal pointer is moved past the end of the data buffer.

Root Cause

The FSSoundConstructor was coded with the assumption that all data blocks would contain an even number of bytes (this is how descriptions of the specification appears to be worded).

Workaround?

No workaround is currently available.

When will it be fixed?

This was fixed in Transform 2.2.1 released on 01-Mar-2008