MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / dataToJson

Function dataToJson

plugins/Cardinal/src/Ildaeil.cpp:604–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602 }
603
604 json_t* dataToJson() override
605 {
606 if (fCarlaHostHandle == nullptr)
607 return nullptr;
608
609 CarlaEngine* const engine = carla_get_engine_from_handle(fCarlaHostHandle);
610
611 water::MemoryOutputStream projectState;
612 engine->saveProjectInternal(projectState);
613
614 const size_t dataSize = projectState.getDataSize();
615 #ifndef CARDINAL_SYSDEPS
616 return jsonp_stringn_nocheck_own(static_cast<const char*>(projectState.getDataAndRelease()), dataSize);
617 #else
618 return json_stringn(static_cast<const char*>(projectState.getData()), dataSize);
619 #endif
620 }
621
622 void dataFromJson(json_t* const rootJ) override
623 {

Callers 1

HostAudio.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected