Giter Club home page Giter Club logo

esp-audio-player's People

Contributors

chmorgan avatar espressif2022 avatar mahavirj avatar rohansingh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

esp-audio-player's Issues

ESP-BOX status error -6

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
error-6

lock != NULL && "Uninitialized lock used"

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!

image

Infinite Loop Issue on Decoding Error in audio_mp3.cpp

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.
1

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.

  • Add a new event type AUDIO_PLAYER_REQUEST_ERROR to the audio_player_event_type_t enumeration in audio_player.h.

typedef enum {
// ...
AUDIO_PLAYER_REQUEST_ERROR, // New event type for handling decoding errors
// ...
} audio_player_event_type_t;

Build warning on idfv5.0.

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,
      |         ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.