cocos2d/cocos/audio/android/audio_utils/include/audio_utils/primitives.h
static inline int32_t clamp24_from_q8_23(int32_t ival)
{
    static const int32_t limpos = 0x7fffff;
    static const int32_t limneg = -0x800000;
    if (ival < limneg) {
        return limneg;
    } else if (ival > limpos) {
        return limpos;
    } else {
        return ival;
    }
}
/* Convert a signed fixed-point 32-bit Q8.23 value to a Q0.23 integer value,
 * stored in a 32-bit signed integer (technically stored as Q8.23, but clamped to Q0.23).
 *
 * Values outside the range [-0x800000, 0x7fffff] are clamped to that range.
 */
Convert a signed fixed-point 32-bit Q8.23 value to a Q0.23 integer value,
stored in a 32-bit signed integer (technically stored as Q8.23, but clamped to Q0.23).

Values outside the range [-0x800000, 0x7fffff] are clamped to that range.
Convert a signed fixed - point 32 - bit Q8 . 23 value to a Q0 . 23 integer value stored in a 32 - bit signed integer ( technically stored as Q8 . 23 but clamped to Q0 . 23 ) . Values outside the range [ - 0x800000 0x7fffff ] are clamped to that range .
static inline int32_t clamp24_from_q8_23(int32_t ival)
{
    static const int32_t limpos = 0x7fffff;
    static const int32_t limneg = -0x800000;
    if (ival < limneg) {
        return limneg;
    } else if (ival > limpos) {
        return limpos;
    } else {
        return ival;
    }
}
static inline int32_t clamp24_from_q8_23 ( int32_t ival ) { static const int32_t limpos = 0x7fffff ; static const int32_t limneg = -0x800000 ; if ( ival < limneg ) { return limneg ; } else if ( ival > limpos ) { return limpos ; } else { return ival ; } }
Convert a signed fixed-point 32-bit Q8.23 value to a Q0.23 integer value,
 stored in a 32-bit signed integer (technically stored as Q8.23, but clamped to Q0.23).
Convert a signed fixed - point 32 - bit Q8 . 23 value to a Q0 . 23 integer value stored in a 32 - bit signed integer ( technically stored as Q8 . 23 but clamped to Q0 . 23 ) .