DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit de0b6654109072c462bd4b57b9526cc47fd8d3f3
parent d35fa184156009a59fdae9dfcf05c1df2bfa825b
Author: falkTX <falktx@gmail.com>
Date:   Tue, 15 Sep 2015 16:44:09 +0200

Use nominalBlockLength

Diffstat:
Mdistrho/src/DistrhoPluginLV2.cpp | 10+++++-----
Mdistrho/src/lv2/buf-size.h | 1+
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/distrho/src/DistrhoPluginLV2.cpp b/distrho/src/DistrhoPluginLV2.cpp @@ -661,7 +661,7 @@ public: { for (int i=0; options[i].key != 0; ++i) { - if (options[i].key == fUridMap->map(fUridMap->handle, LV2_BUF_SIZE__maxBlockLength)) + if (options[i].key == fUridMap->map(fUridMap->handle, LV2_BUF_SIZE__nominalBlockLength)) { if (options[i].type == fUridMap->map(fUridMap->handle, LV2_ATOM__Int)) { @@ -671,7 +671,7 @@ public: } else { - d_stderr("Host changed maxBlockLength but with wrong value type"); + d_stderr("Host changed nominalBlockLength but with wrong value type"); continue; } } @@ -1010,12 +1010,12 @@ static LV2_Handle lv2_instantiate(const LV2_Descriptor*, double sampleRate, cons for (int i=0; options[i].key != 0; ++i) { - if (options[i].key == uridMap->map(uridMap->handle, LV2_BUF_SIZE__maxBlockLength)) + if (options[i].key == uridMap->map(uridMap->handle, LV2_BUF_SIZE__nominalBlockLength)) { if (options[i].type == uridMap->map(uridMap->handle, LV2_ATOM__Int)) d_lastBufferSize = *(const int*)options[i].value; else - d_stderr("Host provides maxBlockLength but has wrong value type"); + d_stderr("Host provides nominalBlockLength but has wrong value type"); break; } @@ -1023,7 +1023,7 @@ static LV2_Handle lv2_instantiate(const LV2_Descriptor*, double sampleRate, cons if (d_lastBufferSize == 0) { - d_stderr("Host does not provide maxBlockLength option"); + d_stderr("Host does not provide nominalBlockLength option"); d_lastBufferSize = 2048; } diff --git a/distrho/src/lv2/buf-size.h b/distrho/src/lv2/buf-size.h @@ -24,6 +24,7 @@ #define LV2_BUF_SIZE__fixedBlockLength LV2_BUF_SIZE_PREFIX "fixedBlockLength" #define LV2_BUF_SIZE__maxBlockLength LV2_BUF_SIZE_PREFIX "maxBlockLength" #define LV2_BUF_SIZE__minBlockLength LV2_BUF_SIZE_PREFIX "minBlockLength" +#define LV2_BUF_SIZE__nominalBlockLength LV2_BUF_SIZE_PREFIX "nominalBlockLength" #define LV2_BUF_SIZE__powerOf2BlockLength LV2_BUF_SIZE_PREFIX "powerOf2BlockLength" #define LV2_BUF_SIZE__sequenceSize LV2_BUF_SIZE_PREFIX "sequenceSize"