MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / SetJsonValue

Method SetJsonValue

src/audio_effects/Distortion.cpp:196–213  ·  view source on GitHub ↗

Load Json::Value into this object

Source from the content-addressed store, hash-verified

194
195// Load Json::Value into this object
196void Distortion::SetJsonValue(const Json::Value root) {
197
198 // Set parent data
199 EffectBase::SetJsonValue(root);
200
201 // Set data from Json (if key is found)
202 if (!root["distortion_type"].isNull())
203 distortion_type = (DistortionType)root["distortion_type"].asInt();
204
205 if (!root["input_gain"].isNull())
206 input_gain.SetJsonValue(root["input_gain"]);
207
208 if (!root["output_gain"].isNull())
209 output_gain.SetJsonValue(root["output_gain"]);
210
211 if (!root["tone"].isNull())
212 tone.SetJsonValue(root["tone"]);
213}
214
215// Get all properties for a specific frame
216std::string Distortion::PropertiesJSON(int64_t requested_frame) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected