replace a few CLAMPs by PA_CLAMP_UNLIKELY

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2040 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-11-09 14:20:12 +00:00
parent 01490319d3
commit c1985c2acc
3 changed files with 7 additions and 7 deletions

View file

@ -130,7 +130,7 @@ static void ulaw_from_float32ne(unsigned n, const float *a, uint8_t *b) {
for (; n > 0; n--) {
float v = *(a++);
v = CLAMP(v, -1, 1);
v = PA_CLAMP_UNLIKELY(v, -1, 1);
v *= 0x1FFF;
*(b++) = st_14linear2ulaw((int16_t) v);
}
@ -168,7 +168,7 @@ static void alaw_from_float32ne(unsigned n, const float *a, uint8_t *b) {
for (; n > 0; n--, a++, b++) {
float v = *a;
v = CLAMP(v, -1, 1);
v = PA_CLAMP_UNLIKELY(v, -1, 1);
v *= 0xFFF;
*b = st_13linear2alaw((int16_t) v);
}