mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audioconvert: use SPA_CLAMPF to clamp floats
It generates better assembler.
This commit is contained in:
parent
fd46ef16ed
commit
5a8af97a40
2 changed files with 7 additions and 1 deletions
|
|
@ -147,6 +147,12 @@ struct spa_fraction {
|
|||
SPA_MIN(SPA_MAX(_v, _low), _high); \
|
||||
})
|
||||
|
||||
#define SPA_CLAMPF(v,low,high) \
|
||||
({ \
|
||||
fminf(fmaxf(v, low), high); \
|
||||
})
|
||||
|
||||
|
||||
#define SPA_SWAP(a,b) \
|
||||
({ \
|
||||
__typeof__(a) _t = (a); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue