comparison skeleton/MyPlugin.cpp @ 303:71b6db22a8a8

* Add documentation about default parameters
author cannam
date Thu, 20 May 2010 14:40:56 +0000
parents 6c9f10b8a53a
children
comparison
equal deleted inserted replaced
302:a6e6a00c0195 303:71b6db22a8a8
7 #include "MyPlugin.h" 7 #include "MyPlugin.h"
8 8
9 9
10 MyPlugin::MyPlugin(float inputSampleRate) : 10 MyPlugin::MyPlugin(float inputSampleRate) :
11 Plugin(inputSampleRate) 11 Plugin(inputSampleRate)
12 // Also be sure to set your plugin parameters (presumably stored
13 // in member variables) to their default values here -- the host
14 // will not do that for you
12 { 15 {
13 } 16 }
14 17
15 MyPlugin::~MyPlugin() 18 MyPlugin::~MyPlugin()
16 { 19 {
98 ParameterList list; 101 ParameterList list;
99 102
100 // If the plugin has no adjustable parameters, return an empty 103 // If the plugin has no adjustable parameters, return an empty
101 // list here (and there's no need to provide implementations of 104 // list here (and there's no need to provide implementations of
102 // getParameter and setParameter in that case either). 105 // getParameter and setParameter in that case either).
106
107 // Note that it is your responsibility to make sure the parameters
108 // start off having their default values (e.g. in the constructor
109 // above). The host needs to know the default value so it can do
110 // things like provide a "reset to default" function, but it will
111 // not explicitly set your parameters to their defaults for you if
112 // they have not changed in the mean time.
103 113
104 ParameterDescriptor d; 114 ParameterDescriptor d;
105 d.identifier = "parameter"; 115 d.identifier = "parameter";
106 d.name = "Some Parameter"; 116 d.name = "Some Parameter";
107 d.description = ""; 117 d.description = "";