pull/1/head
asb2m10 11 years ago
parent 5b8add06dd
commit 9b6c3143f8
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 24
      Source/PluginEditor.cpp
  3. 352
      Source/PluginParam.cpp
  4. 36
      Source/PluginParam.h
  5. 18
      Source/PluginProcessor.cpp

@ -49,7 +49,7 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
presets.setBounds(200, 5, 150, 24); presets.setBounds(200, 5, 150, 24);
for(int i=0;i<processor->getNumPrograms();i++) { for(int i=0;i<processor->getNumPrograms();i++) {
presets.addItem( processor->getProgramName(i), i+1); presets.addItem( processor->getProgramName(i), i+1);
} }
presets.setSelectedId(processor->getCurrentProgram()+1, NotificationType::dontSendNotification); presets.setSelectedId(processor->getCurrentProgram()+1, NotificationType::dontSendNotification);
presets.addListener(this); presets.addListener(this);
@ -98,7 +98,7 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
DexedAudioProcessorEditor::~DexedAudioProcessorEditor() { DexedAudioProcessorEditor::~DexedAudioProcessorEditor() {
stopTimer(); stopTimer();
processor->unbindUI(); processor->unbindUI();
} }
//============================================================================== //==============================================================================
@ -134,7 +134,7 @@ void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) {
presets.clear(NotificationType::dontSendNotification); presets.clear(NotificationType::dontSendNotification);
for(int i=0;i<processor->getNumPrograms();i++) { for(int i=0;i<processor->getNumPrograms();i++) {
presets.addItem(processor->getProgramName(i), i+1); presets.addItem(processor->getProgramName(i), i+1);
} }
TRACE("selecting id %d", processor->getCurrentProgram()); TRACE("selecting id %d", processor->getCurrentProgram());
presets.setSelectedId(processor->getCurrentProgram()+1, NotificationType::dontSendNotification); presets.setSelectedId(processor->getCurrentProgram()+1, NotificationType::dontSendNotification);
@ -148,12 +148,12 @@ void DexedAudioProcessorEditor::sliderValueChanged (Slider* slider) {
} }
void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged) { void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged) {
processor->setCurrentProgram(comboBoxThatHasChanged->getSelectedId()-1); processor->setCurrentProgram(comboBoxThatHasChanged->getSelectedId()-1);
processor->updateHostDisplay(); processor->updateHostDisplay();
} }
void DexedAudioProcessorEditor::timerCallback() { void DexedAudioProcessorEditor::timerCallback() {
int32_t env[6]; int32_t env[6];
if ( processor->peekEnvStatus(env) == false ) if ( processor->peekEnvStatus(env) == false )
return; return;
@ -164,11 +164,11 @@ void DexedAudioProcessorEditor::timerCallback() {
} }
void DexedAudioProcessorEditor::updateUI() { void DexedAudioProcessorEditor::updateUI() {
TRACE("update UI called"); TRACE("update UI called");
for(int i=0;i<processor->ctrl.size();i++) { for(int i=0;i<processor->ctrl.size();i++) {
processor->ctrl[i]->updateComponent(); processor->ctrl[i]->updateComponent();
} }
for(int i=0;i<6;i++) { for(int i=0;i<6;i++) {
ops[i].updateFreqDisplay(); ops[i].updateFreqDisplay();
} }
} }

@ -24,45 +24,45 @@
// ************************************************************************ // ************************************************************************
// //
Ctrl::Ctrl(String name) { Ctrl::Ctrl(String name) {
label << name; label << name;
slider = NULL; slider = NULL;
button = NULL; button = NULL;
comboBox = NULL; comboBox = NULL;
} }
void Ctrl::bind(Slider *s) { void Ctrl::bind(Slider *s) {
slider = s; slider = s;
updateComponent(); updateComponent();
s->addListener(this); s->addListener(this);
} }
void Ctrl::bind(Button *b) { void Ctrl::bind(Button *b) {
button = b; button = b;
updateComponent(); updateComponent();
b->addListener(this); b->addListener(this);
} }
void Ctrl::bind(ComboBox *c) { void Ctrl::bind(ComboBox *c) {
comboBox = c; comboBox = c;
updateComponent(); updateComponent();
c->addListener(this); c->addListener(this);
} }
void Ctrl::unbind() { void Ctrl::unbind() {
if ( slider != NULL ) { if ( slider != NULL ) {
slider->removeListener(this); slider->removeListener(this);
slider = NULL; slider = NULL;
} }
if ( button != NULL ) { if ( button != NULL ) {
button->removeListener(this); button->removeListener(this);
button = NULL; button = NULL;
} }
if ( comboBox != NULL ) { if ( comboBox != NULL ) {
comboBox->removeListener(this); comboBox->removeListener(this);
comboBox = NULL; comboBox = NULL;
} }
} }
@ -70,83 +70,83 @@ void Ctrl::unbind() {
// CtrlInt ================================================================ // CtrlInt ================================================================
CtrlInt::CtrlInt(String name, int steps, int offset, bool starts1) : CtrlInt::CtrlInt(String name, int steps, int offset, bool starts1) :
Ctrl(name) { Ctrl(name) {
add1 = starts1 == 1; add1 = starts1 == 1;
this->steps = steps; this->steps = steps;
value = 0; value = 0;
dxOffset = offset; dxOffset = offset;
} }
float CtrlInt::getValuePlugin() { float CtrlInt::getValuePlugin() {
return value / steps; return value / steps;
} }
void CtrlInt::setValuePlugin(float f) { void CtrlInt::setValuePlugin(float f) {
setValue((f * steps)); setValue((f * steps));
} }
void CtrlInt::setValue(int v) { void CtrlInt::setValue(int v) {
if ( v >= steps ) { if ( v >= steps ) {
TRACE("WARNING: value too big %s : %d", label.toRawUTF8(), v); TRACE("WARNING: value too big %s : %d", label.toRawUTF8(), v);
v = steps-1; v = steps-1;
} }
value = v; value = v;
if ( dxOffset >= 0 ) { if ( dxOffset >= 0 ) {
if ( parent != NULL ) if ( parent != NULL )
parent->setDxValue(dxOffset, v); parent->setDxValue(dxOffset, v);
} }
} }
int CtrlInt::getValue() { int CtrlInt::getValue() {
if ( dxOffset >= 0 ) if ( dxOffset >= 0 )
value = parent->data[dxOffset]; value = parent->data[dxOffset];
return value; return value;
} }
String CtrlInt::getValueDisplay() { String CtrlInt::getValueDisplay() {
String ret; String ret;
ret << getValue(); ret << getValue();
return ret; return ret;
} }
void CtrlInt::publishValue(int value) { void CtrlInt::publishValue(int value) {
parent->beginParameterChangeGesture(idx); parent->beginParameterChangeGesture(idx);
parent->setParameterNotifyingHost(idx, (((float)value) / steps)); parent->setParameterNotifyingHost(idx, (((float)value) / steps));
parent->endParameterChangeGesture(idx); parent->endParameterChangeGesture(idx);
} }
void CtrlInt::sliderValueChanged(Slider* moved) { void CtrlInt::sliderValueChanged(Slider* moved) {
publishValue(((int)moved->getValue() - add1)); publishValue(((int)moved->getValue() - add1));
} }
void CtrlInt::buttonClicked (Button* clicked) { void CtrlInt::buttonClicked (Button* clicked) {
publishValue(clicked->getToggleStateValue() == 1 ? 1 : 0); publishValue(clicked->getToggleStateValue() == 1 ? 1 : 0);
} }
void CtrlInt::comboBoxChanged (ComboBox* combo) { void CtrlInt::comboBoxChanged (ComboBox* combo) {
publishValue(combo->getSelectedId()-1); publishValue(combo->getSelectedId()-1);
} }
void CtrlInt::updateComponent() { void CtrlInt::updateComponent() {
//TRACE("setting for %s %d", label.toRawUTF8(), getValue()); //TRACE("setting for %s %d", label.toRawUTF8(), getValue());
if ( slider != NULL ) { if ( slider != NULL ) {
slider->setValue(getValue() + add1, NotificationType::dontSendNotification); slider->setValue(getValue() + add1, NotificationType::dontSendNotification);
} }
if ( button != NULL ) { if ( button != NULL ) {
if ( getValue() == 0 ) { if ( getValue() == 0 ) {
button->setToggleState(false, NotificationType::dontSendNotification); button->setToggleState(false, NotificationType::dontSendNotification);
} else { } else {
button->setToggleState(true, NotificationType::dontSendNotification); button->setToggleState(true, NotificationType::dontSendNotification);
} }
} }
if ( comboBox != NULL ) { if ( comboBox != NULL ) {
int cvalue = getValue() + 1; int cvalue = getValue() + 1;
if ( comboBox->getNumItems() <= cvalue ) { if ( comboBox->getNumItems() <= cvalue ) {
cvalue = comboBox->getNumItems(); cvalue = comboBox->getNumItems();
} }
comboBox->setSelectedId(cvalue, NotificationType::dontSendNotification); comboBox->setSelectedId(cvalue, NotificationType::dontSendNotification);
} }
} }
// ************************************************************************ // ************************************************************************
@ -156,46 +156,46 @@ void DexedAudioProcessor::initCtrl() {
// fill operator values; // fill operator values;
for(int i=0;i<6;i++) { for(int i=0;i<6;i++) {
// In the Sysex, OP6 comes first, then OP5... // In the Sysex, OP6 comes first, then OP5...
//int opTarget = (5-i) * 21; //int opTarget = (5-i) * 21;
// In the Sysex, OP6 comes first, then OP5... // In the Sysex, OP6 comes first, then OP5...
int opTarget = i * 21; int opTarget = i * 21;
for(int j=0;j<4;j++) { for(int j=0;j<4;j++) {
String opRate; String opRate;
opRate << "OP" << (i+1) << "-EGR" << (j+1); opRate << "OP" << (i+1) << "-EGR" << (j+1);
opCtrl[i].egRate[j] = new CtrlInt(opRate, 100, opTarget+j); opCtrl[i].egRate[j] = new CtrlInt(opRate, 100, opTarget+j);
ctrl.add(opCtrl[i].egRate[j]); ctrl.add(opCtrl[i].egRate[j]);
String opLevel; String opLevel;
opLevel << "OP" << (i+1) << "-EGL" << (j+1); opLevel << "OP" << (i+1) << "-EGL" << (j+1);
opCtrl[i].egLevel[j] = new CtrlInt(opLevel, 100, opTarget+j+4); opCtrl[i].egLevel[j] = new CtrlInt(opLevel, 100, opTarget+j+4);
ctrl.add(opCtrl[i].egLevel[j]); ctrl.add(opCtrl[i].egLevel[j]);
} }
String opVol; String opVol;
opVol << "OP" << (i+1) << "-LEVEL"; opVol << "OP" << (i+1) << "-LEVEL";
opCtrl[i].level = new CtrlInt(opVol, 100, opTarget+16); opCtrl[i].level = new CtrlInt(opVol, 100, opTarget+16);
ctrl.add(opCtrl[i].level); ctrl.add(opCtrl[i].level);
String opMode; String opMode;
opMode << "OP" << (i+1) << "-MODE"; opMode << "OP" << (i+1) << "-MODE";
opCtrl[i].opMode = new CtrlInt(opMode, 1, opTarget+17); opCtrl[i].opMode = new CtrlInt(opMode, 1, opTarget+17);
ctrl.add(opCtrl[i].opMode); ctrl.add(opCtrl[i].opMode);
String coarse; String coarse;
coarse << "OP" << (i+1) << "-COARSE"; coarse << "OP" << (i+1) << "-COARSE";
opCtrl[i].coarse = new CtrlInt(coarse, 32, opTarget+18, true); opCtrl[i].coarse = new CtrlInt(coarse, 32, opTarget+18, true);
ctrl.add(opCtrl[i].coarse); ctrl.add(opCtrl[i].coarse);
String fine; String fine;
fine << "OP" << (i+1) << "-FINE"; fine << "OP" << (i+1) << "-FINE";
opCtrl[i].fine = new CtrlInt(fine, 100, opTarget+19); opCtrl[i].fine = new CtrlInt(fine, 100, opTarget+19);
ctrl.add(opCtrl[i].fine); ctrl.add(opCtrl[i].fine);
String detune; String detune;
detune << "OP" << (i+1) << "-DETUNE"; detune << "OP" << (i+1) << "-DETUNE";
opCtrl[i].detune = new CtrlInt(detune, 15, opTarget+20); opCtrl[i].detune = new CtrlInt(detune, 15, opTarget+20);
ctrl.add(opCtrl[i].detune); ctrl.add(opCtrl[i].detune);
} }
algo = new CtrlInt("Algorithm", 32, 134, true); algo = new CtrlInt("Algorithm", 32, 134, true);
@ -207,8 +207,8 @@ void DexedAudioProcessor::initCtrl() {
lfoDelay = new CtrlInt("LFO-Delay", 100, 138); lfoDelay = new CtrlInt("LFO-Delay", 100, 138);
ctrl.add(lfoDelay); ctrl.add(lfoDelay);
lfoPitchDepth = new CtrlInt("LFO-PitchDepth", 100, 139); lfoPitchDepth = new CtrlInt("LFO-PitchDepth", 100, 139);
ctrl.add(lfoPitchDepth); ctrl.add(lfoPitchDepth);
lfoAmpDepth = new CtrlInt("LFO-AmpDepth", 100, 140); lfoAmpDepth = new CtrlInt("LFO-AmpDepth", 100, 140);
ctrl.add(lfoAmpDepth); ctrl.add(lfoAmpDepth);
@ -220,8 +220,8 @@ void DexedAudioProcessor::initCtrl() {
ctrl.add(lfoWaveform); ctrl.add(lfoWaveform);
for(int i=0;i<ctrl.size();i++) { for(int i=0;i<ctrl.size();i++) {
ctrl[i]->idx = i; ctrl[i]->idx = i;
ctrl[i]->parent = this; ctrl[i]->parent = this;
} }
} }
@ -240,63 +240,63 @@ int DexedAudioProcessor::importSysex(const char *imported) {
if (c < 32 || c > 127) c = 32; if (c < 32 || c > 127) c = 32;
break; break;
} }
patchNames[i][j] = c; patchNames[i][j] = c;
} }
patchNames[i][11] = 0; patchNames[i][11] = 0;
} }
return 0; return 0;
} }
void DexedAudioProcessor::unpackSysex(int idx) { void DexedAudioProcessor::unpackSysex(int idx) {
char *bulk = sysex + (idx * 128); char *bulk = sysex + (idx * 128);
for (int op = 0; op < 6; op++) { for (int op = 0; op < 6; op++) {
// eg rate and level, brk pt, depth, scaling // eg rate and level, brk pt, depth, scaling
memcpy(data + op * 21, bulk + op * 17, 11); memcpy(data + op * 21, bulk + op * 17, 11);
char leftrightcurves = bulk[op * 17 + 11]; char leftrightcurves = bulk[op * 17 + 11];
data[op * 21 + 11] = leftrightcurves & 3; data[op * 21 + 11] = leftrightcurves & 3;
data[op * 21 + 12] = (leftrightcurves >> 2) & 3; data[op * 21 + 12] = (leftrightcurves >> 2) & 3;
char detune_rs = bulk[op * 17 + 12]; char detune_rs = bulk[op * 17 + 12];
data[op * 21 + 13] = detune_rs & 7; data[op * 21 + 13] = detune_rs & 7;
char kvs_ams = bulk[op * 17 + 13]; char kvs_ams = bulk[op * 17 + 13];
data[op * 21 + 14] = kvs_ams & 3; data[op * 21 + 14] = kvs_ams & 3;
data[op * 21 + 15] = kvs_ams >> 2; data[op * 21 + 15] = kvs_ams >> 2;
data[op * 21 + 16] = bulk[op * 17 + 14]; // output level data[op * 21 + 16] = bulk[op * 17 + 14]; // output level
char fcoarse_mode = bulk[op * 17 + 15]; char fcoarse_mode = bulk[op * 17 + 15];
data[op * 21 + 17] = fcoarse_mode & 1; data[op * 21 + 17] = fcoarse_mode & 1;
data[op * 21 + 18] = fcoarse_mode >> 1; data[op * 21 + 18] = fcoarse_mode >> 1;
data[op * 21 + 19] = bulk[op * 17 + 16]; // fine freq data[op * 21 + 19] = bulk[op * 17 + 16]; // fine freq
data[op * 21 + 20] = detune_rs >> 3; data[op * 21 + 20] = detune_rs >> 3;
} }
memcpy(data + 126, bulk + 102, 9); // pitch env, algo memcpy(data + 126, bulk + 102, 9); // pitch env, algo
char oks_fb = bulk[111]; char oks_fb = bulk[111];
data[135] = oks_fb & 7; data[135] = oks_fb & 7;
data[136] = oks_fb >> 3; data[136] = oks_fb >> 3;
memcpy(data + 137, bulk + 112, 4); // lfo memcpy(data + 137, bulk + 112, 4); // lfo
char lpms_lfw_lks = bulk[116]; char lpms_lfw_lks = bulk[116];
data[141] = lpms_lfw_lks & 1; data[141] = lpms_lfw_lks & 1;
data[142] = (lpms_lfw_lks >> 1) & 7; data[142] = (lpms_lfw_lks >> 1) & 7;
data[143] = lpms_lfw_lks >> 4; data[143] = lpms_lfw_lks >> 4;
memcpy(data + 144, bulk + 117, 11); // transpose, name memcpy(data + 144, bulk + 117, 11); // transpose, name
data[155] = 1; // operator on/off data[155] = 1; // operator on/off
data[156] = 1; data[156] = 1;
data[157] = 1; data[157] = 1;
data[158] = 1; data[158] = 1;
data[159] = 1; data[159] = 1;
data[160] = 1; data[160] = 1;
} }
void DexedAudioProcessor::setDxValue(int offset, int v) { void DexedAudioProcessor::setDxValue(int offset, int v) {
TRACE("setting dx %d %d", offset, v); TRACE("setting dx %d %d", offset, v);
isDirty = true; isDirty = true;
if ( offset >= 0 ) if ( offset >= 0 )
data[offset] = v; data[offset] = v;
} }
void DexedAudioProcessor::unbindUI() { void DexedAudioProcessor::unbindUI() {
for(int i=0;i<ctrl.size();i++) { for(int i=0;i<ctrl.size();i++) {
ctrl[i]->unbind(); ctrl[i]->unbind();
} }
} }
@ -314,36 +314,36 @@ void DexedAudioProcessor::setParameter (int index, float newValue) {
} }
int DexedAudioProcessor::getNumPrograms() { int DexedAudioProcessor::getNumPrograms() {
// there is 32 program, the 33th one is a ghost for saving "unsaved" preset. // there is 32 program, the 33th one is a ghost for saving "unsaved" preset.
return 32; return 32;
} }
int DexedAudioProcessor::getCurrentProgram() { int DexedAudioProcessor::getCurrentProgram() {
return currentProgram; return currentProgram;
} }
void DexedAudioProcessor::setCurrentProgram (int index) { void DexedAudioProcessor::setCurrentProgram (int index) {
/*// VST has a naughty problem of calling setCurrentProgram after a host has loaded /*// VST has a naughty problem of calling setCurrentProgram after a host has loaded
// an edited preset. We ignore the 16th value, since we want to keep the user values // an edited preset. We ignore the 16th value, since we want to keep the user values
if ( index == 32 ) { if ( index == 32 ) {
return; return;
}*/ }*/
for(int i=0;i<MAX_ACTIVE_NOTES;i++) { for(int i=0;i<MAX_ACTIVE_NOTES;i++) {
if ( voices[i].keydown == false && voices[i].live == true ) { if ( voices[i].keydown == false && voices[i].live == true ) {
voices[i].live = false; voices[i].live = false;
} }
} }
index = index > 31 ? 31 : index; index = index > 31 ? 31 : index;
unpackSysex(index); unpackSysex(index);
currentProgram = index; currentProgram = index;
lfo.reset(data + 137); lfo.reset(data + 137);
updateUI(); updateUI();
} }
const String DexedAudioProcessor::getProgramName (int index) { const String DexedAudioProcessor::getProgramName (int index) {
if ( index >= 32 ) if ( index >= 32 )
index = 31; index = 31;
return String(patchNames[index]); return String(patchNames[index]);
} }
@ -364,25 +364,25 @@ void DexedAudioProcessor::getStateInformation (MemoryBlock& destData) {
// You should use this method to store your parameters in the memory block. // You should use this method to store your parameters in the memory block.
// You could do that either as raw data, or use the XML or ValueTree classes // You could do that either as raw data, or use the XML or ValueTree classes
// as intermediaries to make it easy to save and load complex data.*/ // as intermediaries to make it easy to save and load complex data.*/
destData.insert(data, 161, 0); destData.insert(data, 161, 0);
} }
void DexedAudioProcessor::setStateInformation (const void* source, int sizeInBytes) { void DexedAudioProcessor::setStateInformation (const void* source, int sizeInBytes) {
// You should use this method to restore your parameters from this memory block, // You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call. // whose contents will have been created by the getStateInformation() call.
memcpy((void *)data, source, sizeInBytes); memcpy((void *)data, source, sizeInBytes);
updateUI(); updateUI();
} }
//============================================================================== //==============================================================================
void DexedAudioProcessor::getCurrentProgramStateInformation (MemoryBlock& destData) { void DexedAudioProcessor::getCurrentProgramStateInformation (MemoryBlock& destData) {
destData.insert(data, 161, 0); destData.insert(data, 161, 0);
} }
void DexedAudioProcessor::setCurrentProgramStateInformation (const void* source, int sizeInBytes) { void DexedAudioProcessor::setCurrentProgramStateInformation (const void* source, int sizeInBytes) {
memcpy((void *)data, source, sizeInBytes); memcpy((void *)data, source, sizeInBytes);
updateUI(); updateUI();
} }

@ -35,42 +35,42 @@ protected:
ComboBox *comboBox; ComboBox *comboBox;
public: public:
String label; String label;
Ctrl(String name); Ctrl(String name);
void bind(Slider *s); void bind(Slider *s);
void bind(Button *b); void bind(Button *b);
void bind(ComboBox *c); void bind(ComboBox *c);
void unbind(); void unbind();
virtual void setValuePlugin(float f) = 0; virtual void setValuePlugin(float f) = 0;
virtual float getValuePlugin() = 0; virtual float getValuePlugin() = 0;
virtual String getValueDisplay() = 0; virtual String getValueDisplay() = 0;
virtual void updateComponent() = 0; virtual void updateComponent() = 0;
/** /**
* Index of this parameter * Index of this parameter
*/ */
int idx; int idx;
DexedAudioProcessor *parent; DexedAudioProcessor *parent;
}; };
// CtrlInt // CtrlInt
class CtrlInt : public Ctrl { class CtrlInt : public Ctrl {
int value; int value;
int steps; int steps;
int add1; int add1;
int dxOffset; int dxOffset;
public: public:
CtrlInt(String name, int steps, int offset = -1, bool starts1 = false); CtrlInt(String name, int steps, int offset = -1, bool starts1 = false);
void setValuePlugin(float f); void setValuePlugin(float f);
float getValuePlugin(); float getValuePlugin();
void publishValue(int value); void publishValue(int value);
void setValue(int value); void setValue(int value);
int getValue(); int getValue();
String getValueDisplay(); String getValueDisplay();
void sliderValueChanged (Slider* moved); void sliderValueChanged (Slider* moved);
void buttonClicked (Button* buttonThatWasClicked); void buttonClicked (Button* buttonThatWasClicked);
@ -80,8 +80,8 @@ public:
struct OperatorCtrl { struct OperatorCtrl {
ScopedPointer<CtrlInt> egRate[4]; ScopedPointer<CtrlInt> egRate[4];
ScopedPointer<CtrlInt> egLevel[4]; ScopedPointer<CtrlInt> egLevel[4];
ScopedPointer<CtrlInt> level; ScopedPointer<CtrlInt> level;
ScopedPointer<CtrlInt> opMode; ScopedPointer<CtrlInt> opMode;
ScopedPointer<CtrlInt> coarse; ScopedPointer<CtrlInt> coarse;

@ -47,7 +47,7 @@ DexedAudioProcessor::DexedAudioProcessor() {
} }
DexedAudioProcessor::~DexedAudioProcessor() { DexedAudioProcessor::~DexedAudioProcessor() {
TRACE("Bye"); TRACE("Bye");
} }
//============================================================================== //==============================================================================
@ -356,13 +356,13 @@ bool DexedAudioProcessor::hasEditor() const {
} }
void DexedAudioProcessor::updateUI() { void DexedAudioProcessor::updateUI() {
AudioProcessorEditor *editor = getActiveEditor(); AudioProcessorEditor *editor = getActiveEditor();
if ( editor == NULL ) { if ( editor == NULL ) {
TRACE("no editor found"); TRACE("no editor found");
return; return;
} }
DexedAudioProcessorEditor *dexedEditor = (DexedAudioProcessorEditor *) editor; DexedAudioProcessorEditor *dexedEditor = (DexedAudioProcessorEditor *) editor;
dexedEditor->updateUI(); dexedEditor->updateUI();
} }
AudioProcessorEditor* DexedAudioProcessor::createEditor() { AudioProcessorEditor* DexedAudioProcessor::createEditor() {
@ -370,7 +370,7 @@ AudioProcessorEditor* DexedAudioProcessor::createEditor() {
} }
void DexedAudioProcessor::log(const char *source, const char *fmt, ...) { void DexedAudioProcessor::log(const char *source, const char *fmt, ...) {
char output[4096]; char output[4096];
va_list argptr; va_list argptr;
va_start(argptr, fmt); va_start(argptr, fmt);
vsnprintf(output, 4095, fmt, argptr); vsnprintf(output, 4095, fmt, argptr);

Loading…
Cancel
Save