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

◆ next_segment()

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

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

1268{
1269 int32_t len;
1270 if (f->last_seg) return 0;
1271 if (f->next_seg == -1) {
1272 f->last_seg_which = f->segment_count-1; // in case start_page fails
1273 if (!start_page(f)) { f->last_seg = 1; return 0; }
1275 }
1276 len = f->segments[f->next_seg++];
1277 if (len < 255) {
1278 f->last_seg = true;
1279 f->last_seg_which = f->next_seg-1;
1280 }
1281 if (f->next_seg >= f->segment_count)
1282 f->next_seg = -1;
1283 FL_ASSERT(f->bytes_in_seg == 0, "bytes_in_seg must be 0");
1284 f->bytes_in_seg = len;
1285 return len;
1286}
#define FL_ASSERT(x, MSG)
Definition assert.h:6
static int32_t start_page(vorb *f) FL_NOEXCEPT
static int32_t error(vorb *f, enum STBVorbisError e) FL_NOEXCEPT
static constexpr uint8_t PAGEFLAG_continued_packet
fl::i32 int32_t
Definition coder.h:220

References error(), FL_ASSERT, FL_NOEXCEPT, PAGEFLAG_continued_packet, start_page(), and VORBIS_continued_packet_flag_invalid.

Referenced by get8_packet_raw(), and start_decoder().

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