audioconvert: remove S32_SCALE

We don't use it, we use S24_SCALE and then shift. Also adjust the
S32_MIN and S32_MAX values, based on S24 values.
This commit is contained in:
Wim Taymans 2022-07-20 17:45:34 +02:00
parent 862a0746e4
commit 38b3d027ec
2 changed files with 26 additions and 16 deletions

View file

@ -119,9 +119,8 @@
#define F32_TO_S24_32S(v) bswap_32(F32_TO_S24_32(v))
#define F32_TO_S24_32S_D(v,d) bswap_32(F32_TO_S24_32_D(v,d))
#define S32_MIN -2147483648
#define S32_MAX 2147483647
#define S32_SCALE 2147483648.f
#define S32_MIN (S24_MIN * 256)
#define S32_MAX (S24_MAX * 256)
#define S32_TO_F32(v) ITOF(int32_t, (v) >> 8, S24_SCALE, 0.0f)
#define S32S_TO_F32(v) S32_TO_F32(bswap_32(v))
#define F32_TO_S32(v) (F32_TO_S24_32(v) << 8)