mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
audioconvert: fix s24_32 to float
s24_32 needs to be sign extended before converting to float because the upper bits are undefined and might be anything. Fixes #1393
This commit is contained in:
parent
aab72ded6e
commit
3a879e8b1a
2 changed files with 13 additions and 9 deletions
|
|
@ -60,6 +60,9 @@
|
|||
#define S32_TO_F32(v) S24_TO_F32((v) >> 8)
|
||||
#define F32_TO_S32(v) (F32_TO_S24(v) << 8)
|
||||
|
||||
#define S24_32_TO_F32(v) S32_TO_F32((v)<<8)
|
||||
#define F32_TO_S24_32(v) F32_TO_S24(v)
|
||||
|
||||
static inline int32_t read_s24(const void *src)
|
||||
{
|
||||
const int8_t *s = src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue