Browse Source

Au fixes4 (#121)

* Update sample rate from AU

* Fix resid, it is uint16 and not a string
pull/124/head
Damien Zammit Filipe Coelho <falktx@falktx.com> 7 years ago
parent
commit
3176b34ebe
2 changed files with 12 additions and 4 deletions
  1. +9
    -0
      distrho/src/DistrhoPluginAU.cpp
  2. +3
    -4
      distrho/src/DistrhoPluginAUexport.cpp

+ 9
- 0
distrho/src/DistrhoPluginAU.cpp View File

@@ -221,6 +221,8 @@ protected:
destBuffer[i] = (float *)outBuffer.mBuffers[i].mData;
}

updateSampleRate();

updateParameterInputs();

fPlugin.run(srcBuffer, destBuffer, inFramesToProcess);
@@ -241,6 +243,8 @@ protected:
if ((err = AUEffectBase::Initialize()) != noErr)
return err;

updateSampleRate();

fPlugin.activate();

// FIXME this does not seem right
@@ -312,6 +316,11 @@ private:
}
}

void updateSampleRate()
{
d_lastSampleRate = GetSampleRate();
}

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginAU)
};



+ 3
- 4
distrho/src/DistrhoPluginAUexport.cpp View File

@@ -80,13 +80,12 @@ int au_generate_r(const char* const basename)
d_stderr2("AU plugin Id cannot be negative");
return 1;
}
if (uniqueId >= UINT32_MAX)
if (uniqueId >= UINT16_MAX)
{
d_stderr2("AU plugin Id cannot be higher than uint32");
return 1;
d_stderr2("AU plugin Id cannot be higher than uint16");
}

rFile << "#define DISTRHO_PLUGIN_AU_RES_ID \"" + String(uniqueId) + "\"\n";
rFile << "#define DISTRHO_PLUGIN_AU_RES_ID " + String(uniqueId % UINT16_MAX) + "\n";
}

#ifndef DEBUG


Loading…
Cancel
Save