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

◆ decodeNextFrame()

bool fl::third_party::Mp3StreamDecoderImpl::decodeNextFrame ( audio::Sample * out_sample)

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

332 {
333 if (!isReady()) {
334 mErrorMsg = "Decoder not ready";
335 mHasError = true;
336 return false;
337 }
338
339 if (mEndOfStream) {
340 return false;
341 }
342
343 // Try to decode from existing buffer
344 if (findAndDecodeFrame(out_sample)) {
345 return true;
346 }
347
348 // Need more data - try to fill buffer and decode again
349 while (fillBuffer()) {
350 if (findAndDecodeFrame(out_sample)) {
351 return true;
352 }
353 }
354
355 // No more data available
356 mEndOfStream = true;
357 return false;
358}
bool findAndDecodeFrame(audio::Sample *out_sample)
Definition mp3.cpp.hpp:250

References fillBuffer(), findAndDecodeFrame(), isReady(), mEndOfStream, mErrorMsg, and mHasError.

+ Here is the call graph for this function: