This website works better with JavaScript.
Home
Help
Sign In
DISTRHO
/
DPF
mirror of
https://github.com/DISTRHO/DPF
Watch
1
Star
0
Fork
0
Code
Releases
0
Activity
Browse Source
add default value getter
pull/457/head
Chris
10 months ago
parent
bc3cc0b38f
commit
02a698bcc8
2 changed files
with
7 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
dgl/EventHandlers.hpp
+5
-0
dgl/src/EventHandlers.cpp
+ 2
- 0
dgl/EventHandlers.hpp
View File
@@ -136,6 +136,8 @@ public:
// NOTE: value is assumed to be scaled if using log
void setDefault(float def) noexcept;
float getDefault() noexcept;
// NOTE: value is assumed to be scaled if using log
void setRange(float min, float max) noexcept;
+ 5
- 0
dgl/src/EventHandlers.cpp
View File
@@ -624,6 +624,11 @@ void KnobEventHandler::setDefault(const float def) noexcept
pData->usingDefault = true;
}
float KnobEventHandler::getDefault() noexcept
{
return pData->valueDef;
}
void KnobEventHandler::setRange(const float min, const float max) noexcept
{
pData->setRange(min, max);
Write
Preview
Loading…
Cancel
Save