mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-19 08:57:08 -05:00
Fixed interchanged max/min
This commit is contained in:
parent
f726799483
commit
503dfb7162
1 changed files with 8 additions and 8 deletions
|
|
@ -795,32 +795,32 @@ static inline void _norms(const void *src, void *dst,
|
||||||
case 8:
|
case 8:
|
||||||
s = *(int8_t*)src;
|
s = *(int8_t*)src;
|
||||||
if (s >= 0x7f)
|
if (s >= 0x7f)
|
||||||
goto _min;
|
|
||||||
else if (s <= -0x80)
|
|
||||||
goto _max;
|
goto _max;
|
||||||
|
else if (s <= -0x80)
|
||||||
|
goto _min;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
s = *(int16_t*)src;
|
s = *(int16_t*)src;
|
||||||
if (s >= 0x7fff)
|
if (s >= 0x7fff)
|
||||||
goto _min;
|
|
||||||
else if (s <= -0x8000)
|
|
||||||
goto _max;
|
goto _max;
|
||||||
|
else if (s <= -0x8000)
|
||||||
|
goto _min;
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
s = *(int32_t*)src;
|
s = *(int32_t*)src;
|
||||||
if (s >= 0x7fffff)
|
if (s >= 0x7fffff)
|
||||||
goto _min;
|
|
||||||
else if (s <= -0x800000)
|
|
||||||
goto _max;
|
goto _max;
|
||||||
|
else if (s <= -0x800000)
|
||||||
|
goto _min;
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
{
|
{
|
||||||
int64_t s64;
|
int64_t s64;
|
||||||
s64 = *(int64_t*)src;
|
s64 = *(int64_t*)src;
|
||||||
if (s64 >= 0x7fffffff)
|
if (s64 >= 0x7fffffff)
|
||||||
goto _min;
|
|
||||||
else if (s64 <= -0x80000000)
|
|
||||||
goto _max;
|
goto _max;
|
||||||
|
else if (s64 <= -0x80000000)
|
||||||
|
goto _min;
|
||||||
s = s64;
|
s = s64;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue