audioconvert: use SPA_CLAMPF to clamp floats

It generates better assembler.
This commit is contained in:
Wim Taymans 2022-07-19 17:59:14 +02:00
parent fd46ef16ed
commit 5a8af97a40
2 changed files with 7 additions and 1 deletions

View file

@ -40,7 +40,7 @@
#define ITOF(type,v,scale,offs) \
(((type)(v)) * (1.0f / (scale)) - (offs))
#define FTOI(type,v,scale,offs,noise,min,max) \
(type)f32_round(SPA_CLAMP((v) * (scale) + (offs) + (noise), min, max))
(type)f32_round(SPA_CLAMPF((v) * (scale) + (offs) + (noise), min, max))
#define FMT_OPS_MAX_ALIGN 32