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

◆ stb_vorbis_seek()

int32_t fl::third_party::vorbis::stb_vorbis_seek ( stb_vorbis * f,
uint32_t sample_number )

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

4678{
4679 if (!stb_vorbis_seek_frame(f, sample_number))
4680 return 0;
4681
4682 if (sample_number != f->current_loc) {
4683 int32_t n;
4684 uint32 frame_start = f->current_loc;
4685 stb_vorbis_get_frame_float(f, &n, nullptr);
4686 FL_ASSERT(sample_number > frame_start, "sample_number must be > frame_start");
4687 FL_ASSERT(f->channel_buffer_start + (int32_t) (sample_number-frame_start) <= f->channel_buffer_end, "buffer bounds check");
4688 f->channel_buffer_start += (sample_number - frame_start);
4689 }
4690
4691 return 1;
4692}
#define FL_ASSERT(x, MSG)
Definition assert.h:6
int32_t stb_vorbis_get_frame_float(stb_vorbis *f, int32_t *channels, float ***output) FL_NOEXCEPT
int32_t stb_vorbis_seek_frame(stb_vorbis *f, uint32_t sample_number) FL_NOEXCEPT
fl::i32 int32_t
Definition coder.h:220

References FL_ASSERT, FL_NOEXCEPT, stb_vorbis_get_frame_float(), and stb_vorbis_seek_frame().

+ Here is the call graph for this function: