Thanks Mark, I went with the ALawEncoder class and it works like a charm.
I had a look here
http://bit.ly/wp45x5
and reused like this
byte[] GetALawBytes(ref MemoryStream ms) { byte[] data = ms.ToArray(); int length = ms.ToArray().Length; byte[] encoded = new byte[length/ 2]; int outIndex = 0; for (int n = 0; n < length; n += 2) { encoded[outIndex++] = NAudio.Codecs.ALawEncoder.LinearToALawSample(BitConverter.ToInt16(data, n)); } return encoded; }
To keep it simple, I saved the byte array to the disk and played the file with audacity. It works as intended!
Thanks!