diff options
| author | Making Sound Machines <40341903+makingsoundmachines@users.noreply.github.com> | 2024-08-01 14:17:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-01 14:17:52 +0200 |
| commit | 8069312a15ce3e60286a49e72bb80a7fad43d32c (patch) | |
| tree | b738d4b0196eb9d534bfc13bc24e07f2f3323c3d /sw/Core/Src/edit.h | |
| parent | ad566c3ab1ff5500d26b7c96da3fa9cc3be9f36b (diff) | |
| parent | 20df8dfa669f9ef70b591c01a67c1e2b133a40a6 (diff) | |
| download | plinky-8069312a15ce3e60286a49e72bb80a7fad43d32c.tar.gz | |
Merge pull request #20 from makingsoundmachines/main
Fixes encoder response for headphone volume
Diffstat (limited to 'sw/Core/Src/edit.h')
| -rwxr-xr-x | sw/Core/Src/edit.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/Core/Src/edit.h b/sw/Core/Src/edit.h index e521dc7..10f530f 100755 --- a/sw/Core/Src/edit.h +++ b/sw/Core/Src/edit.h @@ -148,7 +148,9 @@ void finger_editing(int fi, int frame) { cur += ev * (FULL / maxi); } else { - cur += (int)floorf(0.5f + ev * maxf(1.f, encaccel * encaccel)); + int ev_sens = 1; + if (pi == P_HEADPHONE) ev_sens = 4; + cur += (int)floorf(0.5f + ev * ev_sens * maxf(1.f, encaccel * encaccel)); #ifdef DEBUG DebugLog("%d\r\n", (int)(maxf(1.f, encaccel * encaccel) * 100)); #endif |
