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 error with NULL sample handling in audiofilters.Filter. #9787

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

relic-se
Copy link

@relic-se relic-se commented Nov 4, 2024

Fixed mishandling of NULL sample within get_buffer method (used by audiosample api) of the newly added audiofilters.Filter class in 9.2.0. The error would occur when either no sample was loaded (ie: .play(...)) or .stop() was called when feeding into another audiosample object. See #9778 for more details and examples.

The method now feeds "silence" audio data into the output buffer and prevents an infinite while loop.

shared-module/audiofilters/Filter.c Outdated Show resolved Hide resolved
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix.

@jepler jepler merged commit 3a0b97d into adafruit:main Nov 5, 2024
30 checks passed
@relic-se relic-se deleted the audiofilters_stopfix branch November 13, 2024 20:44
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