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

◆ go_to_page_before()

static int32_t fl::third_party::vorbis::go_to_page_before ( stb_vorbis * f,
uint32_t limit_offset )
static

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

4434{
4435 uint32_t previous_safe, end;
4436
4437 // now we want to seek back 64K from the limit
4438 if (limit_offset >= 65536 && limit_offset-65536 >= f->first_audio_page_offset)
4439 previous_safe = limit_offset - 65536;
4440 else
4441 previous_safe = f->first_audio_page_offset;
4442
4443 set_file_offset(f, previous_safe);
4444
4445 while (vorbis_find_page(f, &end, nullptr)) {
4446 if (end >= limit_offset && stb_vorbis_get_file_offset(f) < limit_offset)
4447 return 1;
4448 set_file_offset(f, end);
4449 }
4450
4451 return 0;
4452}
static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last) FL_NOEXCEPT
uint32_t stb_vorbis_get_file_offset(stb_vorbis *f) FL_NOEXCEPT
static int32_t set_file_offset(stb_vorbis *f, uint32_t loc) FL_NOEXCEPT
fl::u32 uint32_t
Definition coder.h:219
constexpr T * end(T(&array)[N]) FL_NOEXCEPT

References fl::end(), FL_NOEXCEPT, set_file_offset(), stb_vorbis_get_file_offset(), and vorbis_find_page().

Referenced by seek_to_sample_coarse().

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