Implement basic AU parameter-printing
[ardour.git] / libs / ardour / audio_unit.cc
index 5d0b600e59372e299687110b1dfeecbc321e456d..5d6204a22716f30022410a3d698a6f3a2b5ed243 100644 (file)
@@ -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