Skip to content

Fix audiocore.RawSample with loop=False on esp32*#10540

Closed
deshipu wants to merge 1 commit intoadafruit:mainfrom
python-ugame:main
Closed

Fix audiocore.RawSample with loop=False on esp32*#10540
deshipu wants to merge 1 commit intoadafruit:mainfrom
python-ugame:main

Conversation

@deshipu
Copy link
Copy Markdown

@deshipu deshipu commented Aug 1, 2025

We only want to exit the playing loop when the sample_data wasn't null, otherwise we need to get the buffer and play it once.

Fix #10539

We only want to exit the playing loop when the sample_data wasn't
null, otherwise we need to get the buffer and play it once.

Fix adafruit#10539
@deshipu
Copy link
Copy Markdown
Author

deshipu commented Aug 1, 2025

This is a bit awkward, but I can't think about a better way of doing it right now. Improvements welcome.

@dhalbert
Copy link
Copy Markdown
Collaborator

dhalbert commented Aug 4, 2025

From #10539 (comment)

Even with the above fix, things seem to be pretty broken. There is some random noise at the beginning, and sample rates below about 6000 don't work at all.

I also tried on rp2040, and it will also not play with sample rates below 6000, and will hang when playing a second time.

@dhalbert
Copy link
Copy Markdown
Collaborator

dhalbert commented Aug 4, 2025

The failed jobs are due to an upstream problem with esptool which is now fixed. But if it's not working yet, I won't re-run yet.

@dhalbert dhalbert marked this pull request as draft August 4, 2025 16:34
@deshipu
Copy link
Copy Markdown
Author

deshipu commented Mar 31, 2026

I don't think I have the knowledge to fix this properly. I'm going to close this.

@deshipu deshipu closed this Mar 31, 2026
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.

audiocore.RawSample doesn't work with loop=False on esp32* boards

2 participants