[PR #49] [CLOSED] Fix sweetBits switch logic #64

Closed
opened 2026-05-05 22:04:03 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/airwindows/airwindows/pull/49
Author: @chmaha
Created: 1/7/2024
Status: Closed

Base: masterHead: master


📄 Description

I noticed that the sweetBits switch logic has two issues. First, the logic doesn't allow for a sweet value of 0 (if the sweeten slider is at 0.0, I'd argue that there should be no change in the sound) so I added a case 12: case 12: sweet = 0.0; break;. Second, we can never arrive at a sweetBits value of -1 with the line int sweetBits = 10-floor(A*10.0);. So in order to allow for case values of 12 and -1 we need int sweetBits = 12-floor(A*13.0);.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/airwindows/airwindows/pull/49 **Author:** [@chmaha](https://github.com/chmaha) **Created:** 1/7/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📄 Description I noticed that the sweetBits switch logic has two issues. First, the logic doesn't allow for a sweet value of 0 (if the sweeten slider is at 0.0, I'd argue that there should be no change in the sound) so I added a case 12: `case 12: sweet = 0.0; break;`. Second, we can never arrive at a sweetBits value of -1 with the line `int sweetBits = 10-floor(A*10.0);`. So in order to allow for case values of 12 and -1 we need `int sweetBits = 12-floor(A*13.0);`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 22:04:03 -06:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/airwindows#64
No description provided.