FastLED 3.10.6
Loading...
Searching...
No Matches

◆ init()

bool fl::third_party::Mp3Minimp3Decoder::init ( )

Definition at line 148 of file mp3.cpp.hpp.

148 {
149 if (mDecoder) {
150 return true;
151 }
152
159 if (!mDecoder || !mScratch || !mPcmBuffer) {
160 mDecoder.reset();
161 mScratch.reset();
162 mPcmBuffer.reset();
163 return false;
164 }
165
166 mp3dec_init(mDecoder.get());
167 return true;
168}
fl::unique_ptr< mp3dec_t, Mp3MemoryDeleter< mp3dec_t > > mDecoder
Definition mp3.h:128
fl::unique_ptr< mp3dec_scratch_t, Mp3MemoryDeleter< mp3dec_scratch_t > > mScratch
Definition mp3.h:130
fl::unique_ptr< fl::i16[], Mp3MemoryDeleter< fl::i16 > > mPcmBuffer
Definition mp3.h:124
void mp3dec_init(mp3dec_t *dec) FL_NO_EXCEPT
T * Mp3MemoryAllocateArray(fl::size count, Mp3MemoryTag tag) FL_NO_EXCEPT
Definition mp3.cpp.hpp:16
constexpr fl::size MAX_PCM_SAMPLES
Definition mp3.cpp.hpp:115

References fl::third_party::DecoderState, fl::FL_NO_EXCEPT, fl::third_party::MAX_PCM_SAMPLES, mDecoder, mp3dec_init(), fl::third_party::Mp3MemoryAllocateArray(), mPcmBuffer, mScratch, fl::third_party::PcmOutput, and fl::third_party::Scratch.

Referenced by fl::Mp3::parseMp3Info().

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