mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Add a color for ghost waves (thanks Torben!) and fix wrong ladspa parameter
defaults. The plugin fix corrects a bug related to at least swh's single band parametric. git-svn-id: svn://localhost/ardour2/trunk@1651 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aacf71589f
commit
289e0b8fb8
2 changed files with 13 additions and 1 deletions
|
|
@ -69,6 +69,7 @@ cMeasureLineBeat 0.45 0.45 0.45 0.40
|
|||
cMeasureLineBar 0.55 0.55 0.60 0.55
|
||||
cGhostTrackBaseOutline 0.00 0.00 0.00 1.00
|
||||
cGhostTrackBaseFill 0.27 0.00 0.49 0.50
|
||||
cGhostTrackWave 0.0 3.00 0.0 0.30
|
||||
cImageTrackBase 0.87 0.87 0.85 1.00
|
||||
cImageTrackOutline 0.00 0.00 0.00 1.00
|
||||
cMarkerTrackBase 0.87 0.87 0.85 1.00
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ LadspaPlugin::init (void *mod, uint32_t index, nframes_t rate)
|
|||
|
||||
for (i = 0; i < port_cnt; ++i) {
|
||||
if (LADSPA_IS_PORT_CONTROL(port_descriptor (i))) {
|
||||
cerr << "plugin, port nr " << i << ", data = " << control_data[i] << endl;
|
||||
connect_port (i, &control_data[i]);
|
||||
|
||||
if (LADSPA_IS_PORT_OUTPUT(port_descriptor (i)) &&
|
||||
|
|
@ -164,6 +165,7 @@ LadspaPlugin::default_value (uint32_t port)
|
|||
float ret = 0.0f;
|
||||
bool bounds_given = false;
|
||||
bool sr_scaling = false;
|
||||
bool earlier_hint = false;
|
||||
|
||||
/* defaults - case 1 */
|
||||
|
||||
|
|
@ -172,6 +174,7 @@ LadspaPlugin::default_value (uint32_t port)
|
|||
ret = prh[port].LowerBound;
|
||||
bounds_given = true;
|
||||
sr_scaling = true;
|
||||
earlier_hint = true;
|
||||
}
|
||||
|
||||
/* FIXME: add support for logarithmic defaults */
|
||||
|
|
@ -180,33 +183,41 @@ LadspaPlugin::default_value (uint32_t port)
|
|||
ret = prh[port].LowerBound * 0.75f + prh[port].UpperBound * 0.25f;
|
||||
bounds_given = true;
|
||||
sr_scaling = true;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(prh[port].HintDescriptor)) {
|
||||
ret = prh[port].LowerBound * 0.50f + prh[port].UpperBound * 0.50f;
|
||||
bounds_given = true;
|
||||
sr_scaling = true;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_HIGH(prh[port].HintDescriptor)) {
|
||||
ret = prh[port].LowerBound * 0.25f + prh[port].UpperBound * 0.75f;
|
||||
bounds_given = true;
|
||||
sr_scaling = true;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_MAXIMUM(prh[port].HintDescriptor)) {
|
||||
ret = prh[port].UpperBound;
|
||||
bounds_given = true;
|
||||
sr_scaling = true;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_0(prh[port].HintDescriptor)) {
|
||||
ret = 0.0f;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_1(prh[port].HintDescriptor)) {
|
||||
ret = 1.0f;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_100(prh[port].HintDescriptor)) {
|
||||
ret = 100.0f;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else if (LADSPA_IS_HINT_DEFAULT_440(prh[port].HintDescriptor)) {
|
||||
ret = 440.0f;
|
||||
earlier_hint = true;
|
||||
}
|
||||
else {
|
||||
/* no hint found */
|
||||
|
|
@ -259,7 +270,7 @@ LadspaPlugin::default_value (uint32_t port)
|
|||
|
||||
/* defaults - case 5 */
|
||||
|
||||
if (LADSPA_IS_HINT_SAMPLE_RATE(prh[port].HintDescriptor)) {
|
||||
if (LADSPA_IS_HINT_SAMPLE_RATE(prh[port].HintDescriptor) && !earlier_hint) {
|
||||
if (bounds_given) {
|
||||
if (sr_scaling) {
|
||||
ret *= sample_rate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue