cocos2d/cocos/audio/android/audio_utils/include/audio_utils/primitives.h
static inline float float_from_i32(int32_t ival)
{
    static const float scale = 1. / (float)(1UL << 31);

    return ival * scale;
}
/* Convert a 32-bit Q0.31 value to single-precision floating-point.
 * The output float range is [-1.0, 1.0] for the fixed-point range
 * [0x80000000, 0x7fffffff].
 *
 * Rounding may occur in the least significant 8 bits for large fixed point
 * values due to storage into the 24-bit floating-point significand.
 * Rounding will be to nearest, ties to even.
 */
Convert a 32-bit Q0.31 value to single-precision floating-point.
The output float range is [-1.0, 1.0] for the fixed-point range
[0x80000000, 0x7fffffff].

Rounding may occur in the least significant 8 bits for large fixed point
values due to storage into the 24-bit floating-point significand.
Rounding will be to nearest, ties to even.
Convert a 32 - bit Q0 . 31 value to single - precision floating - point . The output float range is [ - 1 . 0 1 . 0 ] for the fixed - point range [ 0x80000000 0x7fffffff ] . Rounding may occur in the least significant 8 bits for large fixed point values due to storage into the 24 - bit floating - point significand . Rounding will be to nearest ties to even .
static inline float float_from_i32(int32_t ival)
{
    static const float scale = 1. / (float)(1UL << 31);
    return ival * scale;
}
static inline float float_from_i32 ( int32_t ival ) { static const float scale = 1. / ( float ) ( 1UL << 31 ) ; return ival * scale ; }
Convert a 32-bit Q0.31 value to single-precision floating-point.
Convert a 32 - bit Q0 . 31 value to single - precision floating - point .