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

◆ stb_vorbis_get_samples_float_interleaved()

int32_t fl::third_party::vorbis::stb_vorbis_get_samples_float_interleaved ( stb_vorbis * f,
int32_t channels,
float * buffer,
int32_t num_floats )

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

5192{
5193 float **outputs;
5194 int32_t len = num_floats / channels;
5195 int32_t n=0;
5196 int32_t z = f->channels;
5197 if (z > channels) z = channels;
5198 while (n < len) {
5199 int32_t i,j;
5201 if (n+k >= len) k = len - n;
5202 for (j=0; j < k; ++j) {
5203 for (i=0; i < z; ++i)
5204 *buffer++ = f->channel_buffers[i][f->channel_buffer_start+j];
5205 for ( ; i < channels; ++i)
5206 *buffer++ = 0;
5207 }
5208 n += k;
5209 f->channel_buffer_start += k;
5210 if (n == len)
5211 break;
5212 if (!stb_vorbis_get_frame_float(f, nullptr, &outputs))
5213 break;
5214 }
5215 return n;
5216}
uint32_t z[NUM_LAYERS]
Definition Fire2023.h:93
int32_t stb_vorbis_get_frame_float(stb_vorbis *f, int32_t *channels, float ***output) FL_NOEXCEPT
float * channel_buffers[FL_STB_VORBIS_MAX_CHANNELS]
fl::i32 int32_t
Definition coder.h:220

References FL_NOEXCEPT, stb_vorbis_get_frame_float(), and z.

+ Here is the call graph for this function: