projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63a71c5
)
Implement basic AU parameter-printing
author
Robin Gareus
<robin@gareus.org>
Thu, 25 May 2017 11:36:33 +0000
(13:36 +0200)
committer
Robin Gareus
<robin@gareus.org>
Thu, 25 May 2017 11:49:18 +0000
(13:49 +0200)
(don't leave buf uninitialized)
libs/ardour/audio_unit.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/audio_unit.cc
b/libs/ardour/audio_unit.cc
index 5d0b600e59372e299687110b1dfeecbc321e456d..5d6204a22716f30022410a3d698a6f3a2b5ed243 100644
(file)
--- a/
libs/ardour/audio_unit.cc
+++ b/
libs/ardour/audio_unit.cc
@@
-2016,9
+2016,16
@@
AUPlugin::describe_parameter (Evoral::Parameter param)
}
void
-AUPlugin::print_parameter (uint32_t
/*param*/, char* /*buf*/, uint32_t /*len*/
) const
+AUPlugin::print_parameter (uint32_t
param, char* buf, uint32_t len
) const
{
// NameValue stuff here
+ if (buf && len) {
+ if (param < parameter_count()) {
+ snprintf (buf, len, "%.3f", get_parameter (param));
+ } else {
+ strcat (buf, "0");
+ }
+ }
}
bool