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

Method PropertiesJSON

src/audio_effects/Distortion.cpp:216–236  ·  view source on GitHub ↗

Get all properties for a specific frame

Source from the content-addressed store, hash-verified

214
215// Get all properties for a specific frame
216std::string Distortion::PropertiesJSON(int64_t requested_frame) const {
217
218 // Generate JSON properties list
219 Json::Value root = BasePropertiesJSON(requested_frame);
220
221 // Keyframes
222 root["distortion_type"] = add_property_json("Distortion Type", distortion_type, "int", "", NULL, 0, 3, false, requested_frame);
223 root["input_gain"] = add_property_json("Input Gain (dB)", input_gain.GetValue(requested_frame), "int", "", &input_gain, -24, 24, false, requested_frame);
224 root["output_gain"] = add_property_json("Output Gain (dB)", output_gain.GetValue(requested_frame), "int", "", &output_gain, -24, 24, false, requested_frame);
225 root["tone"] = add_property_json("Tone (dB)", tone.GetValue(requested_frame), "int", "", &tone, -24, 24, false, requested_frame);
226
227 // Add distortion_type choices (dropdown style)
228 root["distortion_type"]["choices"].append(add_property_choice_json("Hard Clipping", HARD_CLIPPING, distortion_type));
229 root["distortion_type"]["choices"].append(add_property_choice_json("Soft Clipping", SOFT_CLIPPING, distortion_type));
230 root["distortion_type"]["choices"].append(add_property_choice_json("Exponential", EXPONENTIAL, distortion_type));
231 root["distortion_type"]["choices"].append(add_property_choice_json("Full Wave Rectifier", FULL_WAVE_RECTIFIER, distortion_type));
232 root["distortion_type"]["choices"].append(add_property_choice_json("Half Wave Rectifier", HALF_WAVE_RECTIFIER, distortion_type));
233
234 // Return formatted string
235 return root.toStyledString();
236}

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.80

Tested by

no test coverage detected