chmorgan / esp-audio-player Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Will you push a new tag version v1.0.4 ?
Hello, I'm currently engaged in a project where I've obtained the MP3 data via HTTPS. However, when played on ESP-BOX, an error occurs at the end, leading to an infinite loop that never terminates. I've attached the .mp3 file. Could you assist me with this issue? Please find the .mp3 file from my personal repository link
Here are the log
In my project, I'm reading mp3 files from an SD card and sending them via I2C to an audio amplifier. Everything works fine when I open a file (using fopen()
), play it (with audio_player_play()
), and then open and play the next one.
However, I run into a problem when I try to reopen the same mp3 file a second time. It doesn't matter whether I do this while the playback is ongoing or wait until it's finished.
I always immediately get an error saying, "assert failed: check_lock_nonzero locks.c:300 (lock != NULL && 'Uninitialized lock used')."
Thanks in advance for the help!
This is a very newbie-friendly and easy-to-use library (compared to adf). However, there is currently no control interface for playback speed. Is this possible to be implemented in the future? Or if I want to implement this function, where should I start from?
Related:
sonic docs
sonic code
sonic demo
Description:
I have been working with the audio component in the project and have encountered an issue when an error occurs during the decoding of an MP3 file. Specifically, when any error happens during decoding, the program gets stuck in a continuous loop indefinitely. This behavior occurs in the decode_mp3 function, as referenced in this line: audio_mp3.cpp#L139.
The crossponding error logs are attached below.
Proposed solution:
To address this issue, I propose adding an event to the audio_player module. This event will allow proper handling of decoding errors and prevent the program from getting stuck in the loop. I have identified the relevant location to add the event in the audio_player.h file, as referenced in this line: audio_player.h#L75.
typedef enum {
// ...
AUDIO_PLAYER_REQUEST_ERROR, // New event type for handling decoding errors
// ...
} audio_player_event_type_t;
task_val = xTaskCreatePinnedToCore( (TaskFunction_t) audio_task, "Audio Task", 4 * 1024, &instance, (UBaseType_t) instance.config.priority, (TaskHandle_t * const) NULL, 0);
../managed_components/chmorgan__esp-audio-player/audio_player.cpp:568:9: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
568 | (TaskHandle_t * const) NULL,
| ^
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.