mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
add CLAMP macro
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1876 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
e205bb2555
commit
29d25ec8d9
1 changed files with 5 additions and 1 deletions
|
|
@ -72,6 +72,10 @@ static inline size_t pa_page_align(size_t l) {
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CLAMP
|
||||||
|
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This type is not intended to be used in exported APIs! Use classic "int" there! */
|
/* This type is not intended to be used in exported APIs! Use classic "int" there! */
|
||||||
#ifdef HAVE_STD_BOOL
|
#ifdef HAVE_STD_BOOL
|
||||||
typedef _Bool pa_bool_t;
|
typedef _Bool pa_bool_t;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue