4459{
4461 int32_t i, start_seg_with_known_loc, end_pos, page_start;
4462 uint32 delta, stream_length, padding, last_sample_limit;
4463 double offset = 0.0, bytes_per_sample = 0.0;
4465
4466
4470
4471
4472
4473
4475 if (sample_number < padding)
4476 last_sample_limit = 0;
4477 else
4478 last_sample_limit = sample_number - padding;
4479
4482
4485 }
4486
4489
4490
4495 return 1;
4496 }
4497 return 0;
4498 }
4499
4502
4504 if (delta <= 65536) {
4505
4507 } else {
4508 if (probe < 2) {
4509 if (probe == 0) {
4510
4514 } else {
4515
4520 }
4521
4522
4527
4529 } else {
4530
4531
4533 }
4534
4536 }
4537
4538 for (;;) {
4541
4544 }
4545
4546
4547
4549 if (probe >= 2 || delta <= 65536)
4550 break;
4551 } else {
4553 right = mid;
4554 else
4555 left = mid;
4556 }
4557
4558 ++probe;
4559 }
4560
4561
4566 FL_ASSERT(end_pos >= 0,
"end_pos must be >= 0");
4567
4568 for (;;) {
4569 for (i = end_pos; i > 0; --i)
4571 break;
4572
4573 start_seg_with_known_loc = i;
4574
4576 break;
4577
4578
4581
4585 }
4586
4587
4594 f->
next_seg = start_seg_with_known_loc;
4595
4596 for (i = 0; i < start_seg_with_known_loc; i++)
4598
4599
4601 return 0;
4604 return 1;
4605
4607
4610}
#define FL_ASSERT(x, MSG)
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
static int32_t start_page(vorb *f) FL_NOEXCEPT
static int32_t error(vorb *f, enum STBVorbisError e) FL_NOEXCEPT
static int32_t get_seek_page_info(stb_vorbis *f, ProbedPage *z) FL_NOEXCEPT
static int32_t vorbis_pump_first_frame(stb_vorbis *f) FL_NOEXCEPT
static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last) FL_NOEXCEPT
static void skip(vorb *z, int32_t n) FL_NOEXCEPT
int32_t stb_vorbis_seek_start(stb_vorbis *f) FL_NOEXCEPT
uint32_t stb_vorbis_stream_length_in_samples(stb_vorbis *f) FL_NOEXCEPT
static constexpr uint8_t PAGEFLAG_continued_packet
@ VORBIS_seek_without_length
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
static int32_t go_to_page_before(stb_vorbis *f, uint32_t limit_offset) FL_NOEXCEPT
int32_t current_loc_valid
uint32 last_decoded_sample
int32_t end_seg_with_known_loc