Browse Source

SC: add scratch buf to prep for faster string buildings

tags/v1.3.0
Brian Heim 5 years ago
parent
commit
60f307bb89
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/SuperColliderEngine.cpp

+ 8
- 0
src/SuperColliderEngine.cpp View File

@@ -161,7 +161,15 @@ void SC_VcvPrototypeClient::postText(const char* str, size_t len) {
_engine->display(std::string(str, len));
}

constexpr unsigned overhead = 512;
constexpr unsigned floatSize = 10;
constexpr unsigned insOutsSize = MAX_BUFFER_SIZE * NUM_ROWS * 2 * floatSize;
constexpr unsigned otherArraysSize = floatSize * NUM_ROWS * 8;
constexpr unsigned bufferSize = insOutsSize + otherArraysSize + overhead;
static char scratchBuf[bufferSize];

std::string SC_VcvPrototypeClient::buildScProcessBlockString(const ProcessBlock* block) const noexcept {

std::ostringstream builder;

// TODO so expensive


Loading…
Cancel
Save