WMA Lossless is obviously supposed to fully preserve the source data, however
it appears that sometimes the last few samples of a file will be thrown away.
Taking a particular WAV source, if I encode it to WMAL and then decode it
there are 5 samples missing from the end of the result. The samples are not
quite silent but are very close to it. 5 quiet samples being truncated
probably isn't the end of the world but it is definitely a bug in what is
supposed to be a professional lossless encoder.
Doing a byte-for-byte comparison of the two WAV files shows they are
identical except for the two length markers inside the WAV header (each count
is 20 (decimal) smaller) and there are 20 (decimal) fewer bytes on the end of
the file, equating to 5 16-bit stereo samples.
I have found a couple of other people complaining about this on the Internet
with other source files. It seems not to happen with most inputs but does
happen with a few, and if it happens it happens consistently.
Here is an example of another person with, apparently, the same problem:
http://www.hydrogenaudio.org/forums/lofiversion/index.php/t50907.html
Someone in that thread mentions seeing similar problems as well.
In my case I am trying to encode the 6th track of the new Saul Williams
album into WMA Lossless. This was bought online in the lossless FLAC format
and I initially tried to transcode using dbPowerAmp DMC which detected that
the decoded input and output were not identical. I then confirmed this by
decoding the FLAC to a WAV file and trying to encode that WAV to WMA Lossless
using both dbPowerAmp DMC and the WME9.vbs script from the Windows Media
Encoder (or SDK, I can't remember).
Regardless of the method used the results were identical: A WMA file which,
when decoded back to WAV, is missing the last 5 samples from the original WAV
file.
I also tried doing this on both Vista Ultimate and XP SP2, in case the bug
was particular to the version of Windows Media on the OS. The problem occurs
with both versions of Windows.