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

◆ maybe_start_packet()

static int32_t fl::third_party::vorbis::maybe_start_packet ( vorb * f)
static

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

1247{
1248 if (f->next_seg == -1) {
1249 int32_t x = get8(f);
1250 if (f->eof) return false; // EOF at page boundary is not an error!
1251 if (0x4f != x ) return error(f, VORBIS_missing_capture_pattern);
1252 if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern);
1253 if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern);
1254 if (0x53 != get8(f)) return error(f, VORBIS_missing_capture_pattern);
1255 if (!start_page_no_capturepattern(f)) return false;
1257 // set up enough state that we can read this packet if we want,
1258 // e.g. during recovery
1259 f->last_seg = false;
1260 f->bytes_in_seg = 0;
1262 }
1263 }
1264 return start_packet(f);
1265}
static int32_t error(vorb *f, enum STBVorbisError e) FL_NOEXCEPT
static int32_t start_page_no_capturepattern(vorb *f) FL_NOEXCEPT
static constexpr uint8_t PAGEFLAG_continued_packet
static uint8 get8(vorb *z) FL_NOEXCEPT
static int32_t start_packet(vorb *f) FL_NOEXCEPT
fl::i32 int32_t
Definition coder.h:220

References error(), FL_NOEXCEPT, get8(), PAGEFLAG_continued_packet, start_packet(), start_page_no_capturepattern(), VORBIS_continued_packet_flag_invalid, VORBIS_missing_capture_pattern, and fl::x.

Referenced by stb_vorbis_seek_frame(), and vorbis_decode_initial().

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