Mercurial > hg > piper-cpp
comparison vamp-server/simple-server.cpp @ 188:90c962b68d7f
Merge pull request #2 from piper-audio/dev/step-and-block-size
Pull step & block size out into framing struct, return in config
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Mon, 06 Feb 2017 12:04:25 +0000 |
parents | 3eb00e5c76c4 |
children | 52322dde68ea |
comparison
equal
deleted
inserted
replaced
184:150cfa0c71e1 | 188:90c962b68d7f |
---|---|
482 auto h = mapper.pluginToHandle(creq.plugin); | 482 auto h = mapper.pluginToHandle(creq.plugin); |
483 if (mapper.isConfigured(h)) { | 483 if (mapper.isConfigured(h)) { |
484 throw runtime_error("plugin has already been configured"); | 484 throw runtime_error("plugin has already been configured"); |
485 } | 485 } |
486 | 486 |
487 if (creq.configuration.framing.stepSize == 0 || | |
488 creq.configuration.framing.blockSize == 0) { | |
489 throw runtime_error("step and block size must be non-zero"); | |
490 } | |
491 | |
487 response.configurationResponse = LoaderRequests().configurePlugin(creq); | 492 response.configurationResponse = LoaderRequests().configurePlugin(creq); |
488 | 493 |
489 if (!response.configurationResponse.outputs.empty()) { | 494 if (!response.configurationResponse.outputs.empty()) { |
490 mapper.markConfigured | 495 mapper.markConfigured |
491 (h, creq.configuration.channelCount, creq.configuration.blockSize); | 496 (h, |
497 creq.configuration.channelCount, | |
498 creq.configuration.framing.blockSize); | |
492 response.success = true; | 499 response.success = true; |
493 } | 500 } |
494 break; | 501 break; |
495 } | 502 } |
496 | 503 |