32namespace third_party {
34 class Mp3StreamDecoderImpl;
63 template <
typename Fn>
69 const fl::u8* inptr = data;
70 fl::size bytes_left = len;
71 int frames_decoded = 0;
73 while (bytes_left > 0) {
100 if (bytes_left > 0) {
107 return frames_decoded;
152 bool hasError(
fl::
string* msg =
nullptr) const;
static Mp3Info parseMp3Info(fl::span< const fl::u8 > data, fl::string *error_message=nullptr)
static bool isSupported()
static Mp3DecoderPtr createDecoder(fl::string *error_message=nullptr)
bool begin(fl::filebuf_ptr stream)
bool hasError(fl::string *msg=nullptr) const
~Mp3Decoder() FL_NOEXCEPT
bool decodeNextFrame(audio::Sample *out_sample)
fl::size getPosition() const
fl::unique_ptr< fl::third_party::Mp3StreamDecoderImpl > mImpl
int decodeFrame(const fl::u8 **inbuf, fl::size *bytes_left)
int findSyncWord(const fl::u8 *buf, fl::size len)
Mp3HelixDecoder() FL_NOEXCEPT
~Mp3HelixDecoder() FL_NOEXCEPT
fl::unique_ptr< fl::i16[]> mPcmBuffer
int decode(const fl::u8 *data, fl::size len, Fn on_frame)
fl::vector< audio::Sample > decodeToAudioSamples(const fl::u8 *data, fl::size len)
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
expected< T, E > result
Alias for expected (Rust-style naming)
fl::shared_ptr< filebuf > filebuf_ptr
fl::shared_ptr< Mp3Decoder > Mp3DecoderPtr
FASTLED_SHARED_PTR(Channel)
Base definition for an LED controller.
Mp3Info() FL_NOEXCEPT=default