Use namespace-local constants rather than static const class members for internal level identifiers.
Portability: use fread to read from stdin, rather than read from file descriptor 0
Portability: Build on Windows with Visual Studio 2010's compiler. Return the AudioStream in a std::auto_ptr to prevent copying (and subsequent destruction) of the open file.
Change from auto_ptr to unique_ptr (requires C++11) for build on Linux.
Restrict the use of the unique ptr shared stream to waveform-compare to reduce impact of change to the tool we're using (which crashes on Windows otherwise); use the existing object elsewhere.