| 4463 | } |
| 4464 | |
| 4465 | void ScriptingObjects::ScriptingAudioSampleProcessor::setFile(String fileName) |
| 4466 | { |
| 4467 | if (checkValidObject()) |
| 4468 | { |
| 4469 | |
| 4470 | #if USE_BACKEND |
| 4471 | auto pool = audioSampleProcessor->getMainController()->getCurrentAudioSampleBufferPool(); |
| 4472 | |
| 4473 | if (!fileName.contains("{EXP::") && !pool->areAllFilesLoaded()) |
| 4474 | { |
| 4475 | PoolReference ref(getScriptProcessor()->getMainController_(), fileName, FileHandlerBase::AudioFiles); |
| 4476 | |
| 4477 | if (ref.getReferenceString().contains("{PROJECT_FOLDER}")) |
| 4478 | { |
| 4479 | reportScriptError("You must call Engine.loadAudioFilesIntoPool() before using this method"); |
| 4480 | } |
| 4481 | } |
| 4482 | |
| 4483 | #endif |
| 4484 | |
| 4485 | auto p = dynamic_cast<ProcessorWithExternalData*>(audioSampleProcessor.get()); |
| 4486 | jassert(p != nullptr); |
| 4487 | p->getAudioFile(0)->fromBase64String(fileName); |
| 4488 | } |
| 4489 | } |
| 4490 | |
| 4491 | String ScriptingObjects::ScriptingAudioSampleProcessor::getFilename() |
| 4492 | { |
nothing calls this directly
no test coverage detected