| 301 | } |
| 302 | |
| 303 | std::shared_ptr<AudioPluginInstance> Processor::loadPlugin(const PluginDescription& plugdesc, double sampleRate, |
| 304 | int blockSize, String& err) { |
| 305 | setLogTagStatic("processor"); |
| 306 | traceScope(); |
| 307 | String err2; |
| 308 | AudioPluginFormatManager plugmgr; |
| 309 | plugmgr.addDefaultFormats(); |
| 310 | std::shared_ptr<AudioPluginInstance> inst; |
| 311 | runOnMsgThreadSync([&] { |
| 312 | traceScope(); |
| 313 | inst = std::shared_ptr<AudioPluginInstance>( |
| 314 | plugmgr.createPluginInstance(plugdesc, sampleRate, blockSize, err2).release(), |
| 315 | [](AudioPluginInstance* p) { MessageManager::callAsync([p] { delete p; }); }); |
| 316 | }); |
| 317 | if (nullptr == inst) { |
| 318 | err = "failed loading plugin "; |
| 319 | err << plugdesc.fileOrIdentifier << ": " << err2; |
| 320 | logln(err); |
| 321 | } |
| 322 | return inst; |
| 323 | } |
| 324 | |
| 325 | std::shared_ptr<AudioPluginInstance> Processor::loadPlugin(const String& id, double sampleRate, int blockSize, |
| 326 | String& err, String* idNormalized) { |
nothing calls this directly
no test coverage detected