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

◆ plm_audio_decode()

plm_samples_t * fl::third_party::plm_audio_decode ( plm_audio_t * self)

Definition at line 3296 of file pl_mpeg.hpp.

3296 {
3297 // Do we have at least enough information to decode the frame header?
3298 if (!self->next_frame_data_size) {
3299 if (!plm_buffer_has(self->buffer, 48)) {
3300 return NULL;
3301 }
3303 }
3304
3305 if (
3306 self->next_frame_data_size == 0 ||
3307 !plm_buffer_has(self->buffer, self->next_frame_data_size << 3)
3308 ) {
3309 return NULL;
3310 }
3311
3313 self->next_frame_data_size = 0;
3314
3315 self->samples.time = self->time;
3316
3318 self->time = (double)self->samples_decoded /
3320
3321 return &self->samples;
3322}
#define NULL
int plm_audio_decode_header(plm_audio_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:3339
int plm_buffer_has(plm_buffer_t *self, size_t count) FL_NOEXCEPT
Definition pl_mpeg.hpp:998
static const unsigned short PLM_AUDIO_SAMPLE_RATE[]
Definition pl_mpeg.hpp:3017
void plm_audio_decode_frame(plm_audio_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:3424
#define PLM_AUDIO_SAMPLES_PER_FRAME
Definition pl_mpeg.h:223

References FL_NOEXCEPT, NULL, plm_audio_decode_frame(), plm_audio_decode_header(), PLM_AUDIO_SAMPLE_RATE, PLM_AUDIO_SAMPLES_PER_FRAME, and plm_buffer_has().

Referenced by plm_decode(), and plm_decode_audio().

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