changeset 303:71b6db22a8a8

* Add documentation about default parameters
author cannam
date Thu, 20 May 2010 14:40:56 +0000
parents a6e6a00c0195
children bdfc949cd9ed
files skeleton/MyPlugin.cpp
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/skeleton/MyPlugin.cpp	Tue Oct 06 12:32:20 2009 +0000
+++ b/skeleton/MyPlugin.cpp	Thu May 20 14:40:56 2010 +0000
@@ -9,6 +9,9 @@
 
 MyPlugin::MyPlugin(float inputSampleRate) :
     Plugin(inputSampleRate)
+    // Also be sure to set your plugin parameters (presumably stored
+    // in member variables) to their default values here -- the host
+    // will not do that for you
 {
 }
 
@@ -101,6 +104,13 @@
     // list here (and there's no need to provide implementations of
     // getParameter and setParameter in that case either).
 
+    // Note that it is your responsibility to make sure the parameters
+    // start off having their default values (e.g. in the constructor
+    // above).  The host needs to know the default value so it can do
+    // things like provide a "reset to default" function, but it will
+    // not explicitly set your parameters to their defaults for you if
+    // they have not changed in the mean time.
+
     ParameterDescriptor d;
     d.identifier = "parameter";
     d.name = "Some Parameter";