Implement a simplistic MSADPCM encoder

It's not particularly good, but it's better than silence.
Move the sample conversion routines to a separate file