Skip to content

Add end() method to MixerVoice to allow samples to finish playing bef… #10309

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

Merged
merged 9 commits into from
May 8, 2025

Conversation

rhammell
Copy link

@rhammell rhammell commented May 5, 2025

Added an end method to the MixerVoice class within the auidomixer library.

Calling this method will set the object's loop flag to False. This is different than the stop method, which ends the sample immediately, and instead allows any looping sample to play thorugh its entirety before ending.

This feature was added to fix a problem where samples ended via stop created a loud clicking sound from the connected speaker. By allowing the samples to play out fully, the clicking does not exist.

I have tested this on multiple looping audio samples.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! One suggestion to fix the compile and you'll want to tweak the formatting to get a minimal diff. Thanks!

@tannewt tannewt requested review from gamblor21 and tannewt May 7, 2025 17:36
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you!

Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

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

Looks good to me now. The build error should have been corrected in main.

@gamblor21 gamblor21 merged commit b044c4c into adafruit:main May 8, 2025
491 of 492 checks passed
@rhammell rhammell deleted the add-mixervoice-end-method branch May 9, 2025 01:45
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.

3 participants