FastLED 3.9.15
Loading...
Searching...
No Matches

◆ copy_samples()

static void fl::third_party::vorbis::copy_samples ( short * dest,
float * src,
int32_t len )
static

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

4933{
4934 int32_t i;
4936 for (i=0; i < len; ++i) {
4937 FL_STBV_FASTDEF(temp);
4938 int32_t v = FL_STBV_FAST_SCALED_FLOAT_TO_INT(temp, src[i],15);
4939 if ((uint32_t) (v + 32768) > 65535)
4940 v = v < 0 ? -32768 : 32767;
4941 dest[i] = v;
4942 }
4943}
fl::u32 uint32_t
Definition coder.h:219
fl::i32 int32_t
Definition coder.h:220
#define FL_STBV_FAST_SCALED_FLOAT_TO_INT(temp, x, s)
#define FL_STBV_FASTDEF(x)
#define fl_stbv_check_endianness()

References FL_NOEXCEPT, fl_stbv_check_endianness, FL_STBV_FAST_SCALED_FLOAT_TO_INT, and FL_STBV_FASTDEF.

Referenced by convert_samples_short().

+ Here is the caller graph for this function: