diff options
author | Tim E. Real <termtech@rogers.com> | 2011-08-29 22:44:24 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-08-29 22:44:24 +0000 |
commit | d505c378bdf55445babb73e0ba4085702be35870 (patch) | |
tree | 40ccb82e5b27f118904a5298faedd10fe3b96d36 /muse2/muse/dssihost.cpp | |
parent | 21e75f0c2d14010d060693c77fd3e22e1fccd65d (diff) |
Fixed audio automation graph editing. And now 'snaps' to discrete integer or bool types.
All control movements should update display now. Also slightly changed behaviour of Ctrl class.
TODO: Fix some painting corruption, improve discrete display, add transparency etc. etc.
Applied compilation patch to rhythmbase.ui by Jean-Damien Durand.
Diffstat (limited to 'muse2/muse/dssihost.cpp')
-rw-r--r-- | muse2/muse/dssihost.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp index 850fc8b8..72456dd1 100644 --- a/muse2/muse/dssihost.cpp +++ b/muse2/muse/dssihost.cpp @@ -1092,17 +1092,8 @@ bool DssiSynthIF::init(DssiSynth* s) } cl->setRange(min, max); cl->setName(QString(name)); - LADSPA_PortRangeHint range = ld->PortRangeHints[k]; - if(LADSPA_IS_HINT_TOGGLED(range.HintDescriptor)) - { - cl->setMode(CtrlList::DISCRETE); - cl->setValueType(VAL_BOOL); - } - else - { - cl->setMode(CtrlList::INTERPOLATE); - cl->setValueType(VAL_LINEAR); - } + cl->setValueType(ladspaCtrlValueType(ld, k)); + cl->setMode(ladspaCtrlMode(ld, k)); ld->connect_port(handle, k, &controls[cip].val); @@ -3627,6 +3618,8 @@ const char* DssiSynthIF::paramOutName(unsigned long i) { return (synth && //LADSPA_PortRangeHint DssiSynthIF::range(unsigned long i) { return (synth && synth->dssi) ? synth->dssi->LADSPA_Plugin->PortRangeHints[i] : 0; } LADSPA_PortRangeHint DssiSynthIF::range(unsigned long i) { return synth->dssi->LADSPA_Plugin->PortRangeHints[controls[i].idx]; } LADSPA_PortRangeHint DssiSynthIF::rangeOut(unsigned long i) { return synth->dssi->LADSPA_Plugin->PortRangeHints[controlsOut[i].idx]; } +CtrlValueType DssiSynthIF::ctrlValueType(unsigned long i) const { return ladspaCtrlValueType(synth->dssi->LADSPA_Plugin, controls[i].idx); } +CtrlList::Mode DssiSynthIF::ctrlMode(unsigned long i) const { return ladspaCtrlMode(synth->dssi->LADSPA_Plugin, controls[i].idx); }; #else //DSSI_SUPPORT |