wave shield + 12 bit

What is the shield, link to product doc would be helpful, and post your scetch.
In short, conversion from int_16 to int_12 is right shift operation, for example , sample_12 = sample_16 >>4;