Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for invalid __channelCount in ~AudioBufferManager() #1519

Merged
merged 1 commit into from
Jun 10, 2023
Merged

fix for invalid __channelCount in ~AudioBufferManager() #1519

merged 1 commit into from
Jun 10, 2023

Conversation

lyusupov
Copy link
Contributor

@lyusupov lyusupov commented Jun 10, 2023

AudioOutputPWM method from ESP8266Audio library plays very first audio file just fine,
but gets stuck on a second one.

This is the gdb backtrace:

(gdb) bt
#0  dma_channel_get_irq0_status (channel=3)
    at /home/user/Arduino/hardware/pico/rp2040//pico-sdk/src/rp2_common/hardware_dma/include/hardware/dma.h:633
#1  AudioBufferManager::_irq ()
    at /home/user/Arduino/hardware/pico/rp2040/libraries/AudioBufferManager/src/AudioBufferManager.cpp:281
#2  0x20000cb8 in irq_handler_chain_slots ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

It was found out that the issue is caused by ~AudioBufferManager() destructor that have not freed the irq resource properly after the first run.

This commit fixes the issue.
AudioOutputPWM (ESP8266Audio) can play multiple of WAV files now.

Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, appreciate the PR! Looks good and logically makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants