summaryrefslogtreecommitdiff
path: root/sw/Core/Src/edit.h
diff options
context:
space:
mode:
authorMaking Sound Machines <roland@makingsoundmachines.com>2024-08-01 14:12:07 +0200
committerMaking Sound Machines <roland@makingsoundmachines.com>2024-08-01 14:12:07 +0200
commit20df8dfa669f9ef70b591c01a67c1e2b133a40a6 (patch)
treeb738d4b0196eb9d534bfc13bc24e07f2f3323c3d /sw/Core/Src/edit.h
parentad566c3ab1ff5500d26b7c96da3fa9cc3be9f36b (diff)
downloadplinky-20df8dfa669f9ef70b591c01a67c1e2b133a40a6.tar.gz
fixes Encoder response for headphone volume
Diffstat (limited to 'sw/Core/Src/edit.h')
-rwxr-xr-xsw/Core/Src/edit.h4
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