This is an implemetation of a 9th order noise shaping & dithering class, that runs quite
fast (it has one function that uses Intel x86 assembly, but you can replace it with a
different rounding function if you are running on a non-Intel platform). _aligned_malloc
and _aligned_free require the MSVC++ Processor Pack, available from www.microsoft.com.
You can replace them with "new" and "delete," but allocating aligned memory seems to make
it run faster. Also, you can replace ZeroMemory with a memset that sets the memory to 0
if you aren't using Win32.
Input should be floats from -32768 to 32767 (processS will clip at these points for you,
but clipping is bad when you are trying to convert floats to shorts). Note to reviewer -
it would probably be better if you put the code in a file such as NSDither.h and have a
link to it - it's rather long.
(see linked file)