comparison vamp-server/simple-server.cpp @ 193:bc35e19f3345

Merge branch 'master' of https://github.com/piper-audio/piper-cpp into test/plugin-stub-configured-framing
author Lucas Thompson <dev@lucas.im>
date Tue, 07 Feb 2017 16:35:32 +0000
parents 52322dde68ea
children e0e3d9efa774
comparison
equal deleted inserted replaced
191:79c64ff2610b 193:bc35e19f3345
493 493
494 if (!response.configurationResponse.outputs.empty()) { 494 if (!response.configurationResponse.outputs.empty()) {
495 mapper.markConfigured 495 mapper.markConfigured
496 (h, 496 (h,
497 creq.configuration.channelCount, 497 creq.configuration.channelCount,
498 creq.configuration.framing.blockSize); 498 response.configurationResponse.framing.blockSize);
499 response.success = true; 499 response.success = true;
500 } 500 }
501 break; 501 break;
502 } 502 }
503 503
519 } 519 }
520 520
521 const float **fbuffers = new const float *[channels]; 521 const float **fbuffers = new const float *[channels];
522 for (int i = 0; i < channels; ++i) { 522 for (int i = 0; i < channels; ++i) {
523 if (int(preq.inputBuffers[i].size()) != mapper.getBlockSize(h)) { 523 if (int(preq.inputBuffers[i].size()) != mapper.getBlockSize(h)) {
524 ostringstream os;
525 os << "wrong block size supplied to process ("
526 << preq.inputBuffers[i].size()
527 << ", expecting " << mapper.getBlockSize(h) << ")" << ends;
524 delete[] fbuffers; 528 delete[] fbuffers;
525 throw runtime_error("wrong block size supplied to process"); 529 throw runtime_error(os.str());
526 } 530 }
527 fbuffers[i] = preq.inputBuffers[i].data(); 531 fbuffers[i] = preq.inputBuffers[i].data();
528 } 532 }
529 533
530 response.processResponse.plugin = preq.plugin; 534 response.processResponse.plugin = preq.plugin;