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

◆ peek_decode_initial()

static int32_t fl::third_party::vorbis::peek_decode_initial ( vorb * f,
int32_t * p_left_start,
int32_t * p_left_end,
int32_t * p_right_start,
int32_t * p_right_end,
int32_t * mode )
static

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

4614{
4615 int32_t bits_read, bytes_read;
4616
4617 if (!vorbis_decode_initial(f, p_left_start, p_left_end, p_right_start, p_right_end, mode))
4618 return 0;
4619
4620 // either 1 or 2 bytes were read, figure out which so we can rewind
4621 bits_read = 1 + ilog(f->mode_count-1);
4622 if (f->mode_config[*mode].blockflag)
4623 bits_read += 2;
4624 bytes_read = (bits_read + 7) / 8;
4625
4626 f->bytes_in_seg += bytes_read;
4627 f->packet_bytes -= bytes_read;
4628 skip(f, -bytes_read);
4629 if (f->next_seg == -1)
4630 f->next_seg = f->segment_count - 1;
4631 else
4632 f->next_seg--;
4633 f->valid_bits = 0;
4634
4635 return 1;
4636}
static int32_t ilog(int32 n) FL_NOEXCEPT
static void skip(vorb *z, int32_t n) FL_NOEXCEPT
static int32_t vorbis_decode_initial(vorb *f, int32_t *p_left_start, int32_t *p_left_end, int32_t *p_right_start, int32_t *p_right_end, int32_t *mode) FL_NOEXCEPT
fl::i32 int32_t
Definition coder.h:220

References FL_NOEXCEPT, ilog(), skip(), and vorbis_decode_initial().

Referenced by stb_vorbis_seek_frame().

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