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

◆ plm_buffer_seek()

void fl::third_party::plm_buffer_seek ( plm_buffer_t * self,
size_t pos )

Definition at line 923 of file pl_mpeg.hpp.

923 {
924 self->has_ended = FALSE;
925
926 if (self->seek_callback) {
927 self->seek_callback(self, pos, self->load_callback_user_data);
928 self->bit_index = 0;
929 self->length = 0;
930 }
931 else if (self->mode == PLM_BUFFER_MODE_RING) {
932 if (pos != 0) {
933 // Seeking to non-0 is forbidden for dynamic-mem buffers
934 return;
935 }
936 self->bit_index = 0;
937 self->length = 0;
938 self->total_size = 0;
939 }
940 else if (pos < self->length) {
941 self->bit_index = pos << 3;
942 }
943}
uint8_t pos
Definition Blur.ino:11
fl::UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
enum plm_buffer_mode mode
Definition pl_mpeg.hpp:743
plm_buffer_seek_callback seek_callback
Definition pl_mpeg.hpp:739
#define FALSE
Definition pl_mpeg.hpp:175

References FALSE, FL_NOEXCEPT, length(), PLM_BUFFER_MODE_RING, and pos.

Referenced by plm_buffer_rewind(), and plm_demux_buffer_seek().

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