FastLED 3.10.8
Loading...
Searching...
No Matches

◆ float32_unpack()

static float fl::third_party::vorbis::float32_unpack ( uint32 x)
static

Definition at line 787 of file stb_vorbis.cpp.hpp.

788{
789 // from the specification
790 uint32 mantissa = x & 0x1fffff;
791 uint32 sign = x & 0x80000000;
792 uint32 exp = (x & 0x7fe00000) >> 21;
793 double res = sign ? -(double)mantissa : (double)mantissa;
794 return (float) ldexp((float)res, (int32_t)exp-788);
795}
double ldexp(double value, int exp) FL_NO_EXCEPT
Definition math.h:523
enable_if< is_fixed_point< T >::value, T >::type exp(T x) FL_NO_EXCEPT
constexpr enable_if< is_fixed_point< T >::value, int >::type sign(T x) FL_NO_EXCEPT
fl::i32 int32_t
Definition stdint.h:219

References exp(), fl::FL_NO_EXCEPT, ldexp(), fl::sign(), and fl::x.

Referenced by start_decoder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: