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

◆ convert_samples_short()

static void fl::third_party::vorbis::convert_samples_short ( int32_t buf_c,
short ** buffer,
int32_t b_offset,
int32_t data_c,
float ** data,
int32_t d_offset,
int32_t samples )
static

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

5010{
5011 int32_t i;
5012 if (buf_c != data_c && buf_c <= 2 && data_c <= 6) {
5013 static int32_t channel_selector[3][2] = { {0}, {PLAYBACK_MONO}, {PLAYBACK_LEFT, PLAYBACK_RIGHT} };
5014 for (i=0; i < buf_c; ++i)
5015 compute_samples(channel_selector[buf_c][i], buffer[i]+b_offset, data_c, data, d_offset, samples);
5016 } else {
5017 int32_t limit = buf_c < data_c ? buf_c : data_c;
5018 for (i=0; i < limit; ++i)
5019 copy_samples(buffer[i]+b_offset, data[i]+d_offset, samples);
5020 for ( ; i < buf_c; ++i)
5021 memset(buffer[i]+b_offset, 0, sizeof(short) * samples);
5022 }
5023}
static constexpr int8_t PLAYBACK_LEFT
static constexpr int8_t PLAYBACK_RIGHT
static constexpr int8_t PLAYBACK_MONO
void * memset(void *s, int c, size_t n) FL_NOEXCEPT
static void copy_samples(short *dest, float *src, int32_t len) FL_NOEXCEPT
static void compute_samples(int32_t mask, short *output, int32_t num_c, float **data, int32_t d_offset, int32_t len) FL_NOEXCEPT
fl::i32 int32_t
Definition coder.h:220

References compute_samples(), copy_samples(), FL_NOEXCEPT, memset(), PLAYBACK_LEFT, PLAYBACK_MONO, and PLAYBACK_RIGHT.

Referenced by stb_vorbis_get_frame_short(), and stb_vorbis_get_samples_short().

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