public static int clampMono(int value){
  return Math.max(Math.min(value,0x7FFF),-0x8000);
}

public static int clampMono ( int value ) { return Math . max ( Math . min ( value , 0x7FFF ) , - 0x8000 ) ; }
clamp a mono audio sample to a valid range [ - 0x8000 . . 0x7fff ] .
