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

Start linear ramps at the initial volume set #1318

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Conversation

robertwu1
Copy link
Collaborator

@robertwu1 robertwu1 commented Jun 28, 2021

Currently this ramp starts at 0 for the first ramp for no reason. Start this at the initial volume set.

This will help with clicking issues when pressing the volume up and down keys.

Tested via: Installed and ran updated tests via UnitTestRunner app

@robertwu1 robertwu1 requested a review from philburk June 28, 2021 18:52
@@ -32,6 +32,10 @@ void RampLinear::setLengthInFrames(int32_t frames) {

void RampLinear::setTarget(float target) {
mTarget.store(target);
// If the ramp has not been used then start immediately at this level.
if (mLastCallCount < 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could check == kInitialCallCount

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea! Addressed in the second commit!

@robertwu1 robertwu1 requested a review from philburk June 29, 2021 15:48
@robertwu1 robertwu1 merged commit 7146098 into master Jun 29, 2021
@robertwu1 robertwu1 deleted the robertwu/LinearRampFix branch July 14, 2021 17:01
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