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

◆ get_seek_page_info()

static int32_t fl::third_party::vorbis::get_seek_page_info ( stb_vorbis * f,
ProbedPage * z )
static

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

4402{
4403 uint8 header[27], lacing[255];
4404 int32_t i,len;
4405
4406 // record where the page starts
4407 z->page_start = stb_vorbis_get_file_offset(f);
4408
4409 // parse the header
4410 getn(f, header, 27);
4411 if (header[0] != 'O' || header[1] != 'g' || header[2] != 'g' || header[3] != 'S')
4412 return 0;
4413 getn(f, lacing, header[26]);
4414
4415 // determine the length of the payload
4416 len = 0;
4417 for (i=0; i < header[26]; ++i)
4418 len += lacing[i];
4419
4420 // this implies where the page ends
4421 z->page_end = z->page_start + 27 + header[26] + len;
4422
4423 // read the last-decoded sample out of the data
4424 z->last_decoded_sample = header[6] + (header[7] << 8) + ((uint32)header[8] << 16) + ((uint32)header[9] << 24);
4425
4426 // restore file state to where we were
4427 set_file_offset(f, z->page_start);
4428 return 1;
4429}
uint32_t z[NUM_LAYERS]
Definition Fire2023.h:93
static int32_t getn(vorb *z, uint8 *data, int32_t n) 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::i32 int32_t
Definition coder.h:220

References FL_NOEXCEPT, getn(), set_file_offset(), stb_vorbis_get_file_offset(), and z.

Referenced by seek_to_sample_coarse().

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