Lines Matching refs:sample
51 int sample = samples[i]; in encode() local
52 int sign = (sample >> 8) & 0x80; in encode()
53 if (sample < 0) { in encode()
54 sample = -sample; in encode()
56 sample += 132; in encode()
57 if (sample > 32767) { in encode()
58 sample = 32767; in encode()
60 int exponent = gExponents[sample >> 8]; in encode()
61 int mantissa = (sample >> (exponent + 3)) & 0x0F; in encode()
77 int sample = (((mantissa << 3) + 132) << exponent) - 132; in decode() local
78 samples[i] = (ulaw < 0 ? -sample : sample); in decode()
102 int sample = samples[i]; in encode() local
103 int sign = (sample >> 8) & 0x80; in encode()
104 if (sample < 0) { in encode()
105 sample = -sample; in encode()
107 if (sample > 32767) { in encode()
108 sample = 32767; in encode()
110 int exponent = gExponents[sample >> 8]; in encode()
111 int mantissa = (sample >> (exponent == 0 ? 4 : exponent + 3)) & 0x0F; in encode()
127 int sample = (exponent == 0 ? (mantissa << 4) + 8 : in decode() local
129 samples[i] = (alaw < 0 ? sample : -sample); in decode()