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

◆ plm_audio_create_with_buffer()

plm_audio_t * fl::third_party::plm_audio_create_with_buffer ( plm_buffer_t * buffer,
int destroy_when_done )

Definition at line 3235 of file pl_mpeg.hpp.

3235 {
3236 plm_audio_t *self = (plm_audio_t *)PLM_MALLOC(sizeof(plm_audio_t));
3237 fl::memset(self, 0, sizeof(plm_audio_t));
3238
3240 self->buffer = buffer;
3241 self->destroy_buffer_when_done = destroy_when_done;
3242 self->samplerate_index = 3; // Indicates 0
3243
3244 fl::memcopy(self->D, PLM_AUDIO_SYNTHESIS_WINDOW, 512 * sizeof(float));
3245 fl::memcopy(self->D + 512, PLM_AUDIO_SYNTHESIS_WINDOW, 512 * sizeof(float));
3246
3247 // Attempt to decode first header
3249
3250 return self;
3251}
static const float PLM_AUDIO_SYNTHESIS_WINDOW[]
Definition pl_mpeg.hpp:3031
int plm_audio_decode_header(plm_audio_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:3339
void * memcopy(void *dest, const void *src, size_t n) FL_NOEXCEPT
Definition cstring.h:103
void * memset(void *s, int c, size_t n) FL_NOEXCEPT
#define PLM_AUDIO_SAMPLES_PER_FRAME
Definition pl_mpeg.h:223
#define PLM_MALLOC(sz)
Definition pl_mpeg.hpp:179

References fl::third_party::plm_audio_t::buffer, fl::third_party::plm_samples_t::count, fl::third_party::plm_audio_t::D, fl::third_party::plm_audio_t::destroy_buffer_when_done, FL_NOEXCEPT, fl::memcopy(), fl::memset(), fl::third_party::plm_audio_t::next_frame_data_size, plm_audio_decode_header(), PLM_AUDIO_SAMPLES_PER_FRAME, PLM_AUDIO_SYNTHESIS_WINDOW, PLM_MALLOC, fl::third_party::plm_audio_t::samplerate_index, and fl::third_party::plm_audio_t::samples.

Referenced by plm_init_decoders().

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