updated for 22KHz and ALAW