diff --git a/alaw.go b/alaw.go index 5120fb8..40945c3 100644 --- a/alaw.go +++ b/alaw.go @@ -92,7 +92,7 @@ func EncodeAlawFrame(frame int16) uint8 { compressedByte = frame >> 4 if compressedByte > 15 { seg = int16(12 - bits.LeadingZeros16(uint16(compressedByte))) - compressedByte >>= seg - 1 + compressedByte >>= uint(seg - 1) compressedByte -= 16 compressedByte += seg << 4 } diff --git a/ulaw.go b/ulaw.go index f0cf821..165e166 100644 --- a/ulaw.go +++ b/ulaw.go @@ -99,7 +99,7 @@ func EncodeUlawFrame(frame int16) uint8 { frame = ulawClip } seg = int16(16 - bits.LeadingZeros16(uint16(frame>>5))) - lowNibble = 0x000F - ((frame >> (seg)) & 0x000F) + lowNibble = 0x000F - ((frame >> uint(seg)) & 0x000F) return uint8(sign | ((8 - seg) << 4) | lowNibble) }