3 #include "jsonconvert.h"
11 static const char *e_lim_release_to_string(
enum e_lim_release value)
25 static bool string_to_e_lim_release(
const char *str,
enum e_lim_release *value)
28 if (strcasecmp(str,
"Slow")==0)
33 if (strcasecmp(str,
"Medium Slow")==0)
38 if (strcasecmp(str,
"Medium Fast")==0)
43 if (strcasecmp(str,
"Fast")==0)
49 if (strcasecmp(str,
"Medium_Slow")==0)
54 if (strcasecmp(str,
"Medium_Fast")==0)
64 if (strncasecmp(str,
"Slow", strlen(
"Slow"))==0)
69 if (strncasecmp(str,
"Medium_Slow", strlen(
"Medium_Slow"))==0)
74 if (strncasecmp(str,
"Medium_Fast", strlen(
"Medium_Fast"))==0)
79 if (strncasecmp(str,
"Fast", strlen(
"Fast"))==0)
89 PLOG_WARNING <<
"Failed to convert '" << str <<
"' to enum lim_release";
95 static const char *e_bs1770_vutype_to_string(
enum e_bs1770_vutype value)
107 static bool string_to_e_bs1770_vutype(
const char *str,
enum e_bs1770_vutype *value)
110 if (strcasecmp(str,
"Momentary")==0)
115 if (strcasecmp(str,
"Short-Term")==0)
120 if (strcasecmp(str,
"Long-Term")==0)
126 if (strcasecmp(str,
"ShortTerm")==0)
131 if (strcasecmp(str,
"LongTerm")==0)
141 if (strncasecmp(str,
"Momentary", strlen(
"Momentary"))==0)
146 if (strncasecmp(str,
"ShortTerm", strlen(
"ShortTerm"))==0)
151 if (strncasecmp(str,
"LongTerm", strlen(
"LongTerm"))==0)
161 PLOG_WARNING <<
"Failed to convert '" << str <<
"' to enum bs1770_vutype";
167 static const char *e_lk_mode_to_string(
enum e_lk_mode value)
171 return "Stereo Link";
173 return "Independant";
175 return "Mixed Channel";
179 static bool string_to_e_lk_mode(
const char *str,
enum e_lk_mode *value)
182 if (strcasecmp(str,
"Stereo Link")==0)
187 if (strcasecmp(str,
"Independant")==0)
192 if (strcasecmp(str,
"Mixed Channel")==0)
198 if (strcasecmp(str,
"Stereo_Link")==0)
203 if (strcasecmp(str,
"Mixed_Channel")==0)
213 if (strncasecmp(str,
"Stereo_Link", strlen(
"Stereo_Link"))==0)
218 if (strncasecmp(str,
"Independant", strlen(
"Independant"))==0)
223 if (strncasecmp(str,
"Mixed_Channel", strlen(
"Mixed_Channel"))==0)
233 PLOG_WARNING <<
"Failed to convert '" << str <<
"' to enum lk_mode";
239 static const char *e_history_unit_to_string(
enum e_history_unit value)
253 static bool string_to_e_history_unit(
const char *str,
enum e_history_unit *value)
256 if (strcasecmp(str,
"Second")==0)
261 if (strcasecmp(str,
"Minute")==0)
266 if (strcasecmp(str,
"Hour")==0)
271 if (strcasecmp(str,
"Day")==0)
282 if (strncasecmp(str,
"Second", strlen(
"Second"))==0)
287 if (strncasecmp(str,
"Minute", strlen(
"Minute"))==0)
292 if (strncasecmp(str,
"Hour", strlen(
"Hour"))==0)
297 if (strncasecmp(str,
"Day", strlen(
"Day"))==0)
307 PLOG_WARNING <<
"Failed to convert '" << str <<
"' to enum history_unit";
313 static const char *e_history_var_to_string(
enum e_history_var value)
317 return "Input Long-Term LUFS";
319 return "Output Long-Term LUFS";
323 static bool string_to_e_history_var(
const char *str,
enum e_history_var *value)
326 if (strcasecmp(str,
"Input Long-Term LUFS")==0)
331 if (strcasecmp(str,
"Output Long-Term LUFS")==0)
337 if (strcasecmp(str,
"in_bs_long")==0)
342 if (strcasecmp(str,
"out_bs_long")==0)
352 if (strncasecmp(str,
"in_bs_long", strlen(
"in_bs_long"))==0)
357 if (strncasecmp(str,
"out_bs_long", strlen(
"out_bs_long"))==0)
367 PLOG_WARNING <<
"Failed to convert '" << str <<
"' to enum history_var";
384 static bool FromJson(
const JSON_Value& json,
json_peakhold& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_peakhold> &constraints = JsonConstraint<json_peakhold>()) {
386 if (json.IsNull()) {
return true; }
387 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
388 if ( !JsonHelper::Member_FromJson(json, flags,
"hold", data.hold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
389 if ( !JsonHelper::Member_FromJson(json, flags,
"pk", data.pk, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
393 static bool ToJson(JSON_Value &json,
const json_peakhold& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
395 if (json.IsNull ()) {
397 flags &= ~JSON_CVT_ONLYREQ;
398 }
else if (!json.IsObject()) {
399 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
402 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hold", data.hold))
return false;
403 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"pk", data.pk))
return false;
404 if (json.MemberCount()==0) json.SetNull();
408 static bool DiffToJson(JSON_Value &json,
const json_peakhold& data [[maybe_unused]],
json_peakhold& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
410 if (json.IsNull ()) {
412 flags &= ~JSON_CVT_ONLYREQ;
413 }
else if (!json.IsObject()) {
414 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
417 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hold", data.hold, ref.hold))
return false;
418 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"pk", data.pk, ref.pk))
return false;
419 if (json.MemberCount()==0) json.SetNull();
424 JsonHelper::Member_ForceChange(allocator,
"hold", data.hold, ref.hold);
425 JsonHelper::Member_ForceChange(allocator,
"pk", data.pk, ref.pk);
434 static bool FromJson(
const JSON_Value& json,
json_peakhold_stereo& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_peakhold_stereo> &constraints = JsonConstraint<json_peakhold_stereo>()) {
436 if (json.IsNull()) {
return true; }
437 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
438 if ( !JsonHelper::Member_FromJson(json, flags,
"hold", data.hold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
439 if ( !JsonHelper::Member_FromJson(json, flags,
"pk", data.pk, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
443 static bool ToJson(JSON_Value &json,
const json_peakhold_stereo& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
445 if (json.IsNull ()) {
447 flags &= ~JSON_CVT_ONLYREQ;
448 }
else if (!json.IsObject()) {
449 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
452 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hold", data.hold))
return false;
453 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"pk", data.pk))
return false;
454 if (json.MemberCount()==0) json.SetNull();
460 if (json.IsNull ()) {
462 flags &= ~JSON_CVT_ONLYREQ;
463 }
else if (!json.IsObject()) {
464 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
467 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hold", data.hold, ref.hold))
return false;
468 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"pk", data.pk, ref.pk))
return false;
469 if (json.MemberCount()==0) json.SetNull();
474 JsonHelper::Member_ForceChange(allocator,
"hold", data.hold, ref.hold);
475 JsonHelper::Member_ForceChange(allocator,
"pk", data.pk, ref.pk);
484 static bool FromJson(
const JSON_Value& json,
json_vupeakhold_stereo& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_vupeakhold_stereo> &constraints = JsonConstraint<json_vupeakhold_stereo>()) {
486 if (json.IsNull()) {
return true; }
487 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
488 if ( !JsonHelper::Member_FromJson(json, flags,
"hold", data.hold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
489 if ( !JsonHelper::Member_FromJson(json, flags,
"pk", data.pk, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
490 if ( !JsonHelper::Member_FromJson(json, flags,
"vu", data.vu, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
494 static bool ToJson(JSON_Value &json,
const json_vupeakhold_stereo& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
496 if (json.IsNull ()) {
498 flags &= ~JSON_CVT_ONLYREQ;
499 }
else if (!json.IsObject()) {
500 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
503 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hold", data.hold))
return false;
504 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"pk", data.pk))
return false;
505 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vu", data.vu))
return false;
506 if (json.MemberCount()==0) json.SetNull();
512 if (json.IsNull ()) {
514 flags &= ~JSON_CVT_ONLYREQ;
515 }
else if (!json.IsObject()) {
516 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
519 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hold", data.hold, ref.hold))
return false;
520 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"pk", data.pk, ref.pk))
return false;
521 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vu", data.vu, ref.vu))
return false;
522 if (json.MemberCount()==0) json.SetNull();
527 JsonHelper::Member_ForceChange(allocator,
"hold", data.hold, ref.hold);
528 JsonHelper::Member_ForceChange(allocator,
"pk", data.pk, ref.pk);
529 JsonHelper::Member_ForceChange(allocator,
"vu", data.vu, ref.vu);
538 static bool FromJson(
const JSON_Value& json,
json_peak_percent& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_peak_percent> &constraints = JsonConstraint<json_peak_percent>()) {
540 if (json.IsNull()) {
return true; }
541 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
542 if ( !JsonHelper::Member_FromJson(json, flags,
"hold", data.hold, allocator, JsonConstraint<S4Float>(0,100)))
return false;
543 if ( !JsonHelper::Member_FromJson(json, flags,
"pk", data.pk, allocator, JsonConstraint<S4Float>(0,100)))
return false;
547 static bool ToJson(JSON_Value &json,
const json_peak_percent& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
549 if (json.IsNull ()) {
551 flags &= ~JSON_CVT_ONLYREQ;
552 }
else if (!json.IsObject()) {
553 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
556 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hold", data.hold))
return false;
557 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"pk", data.pk))
return false;
558 if (json.MemberCount()==0) json.SetNull();
564 if (json.IsNull ()) {
566 flags &= ~JSON_CVT_ONLYREQ;
567 }
else if (!json.IsObject()) {
568 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
571 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hold", data.hold, ref.hold))
return false;
572 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"pk", data.pk, ref.pk))
return false;
573 if (json.MemberCount()==0) json.SetNull();
578 JsonHelper::Member_ForceChange(allocator,
"hold", data.hold, ref.hold);
579 JsonHelper::Member_ForceChange(allocator,
"pk", data.pk, ref.pk);
588 static bool FromJson(
const JSON_Value& json,
json_band_peakhold& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_band_peakhold> &constraints = JsonConstraint<json_band_peakhold>()) {
590 if (json.IsNull()) {
return true; }
591 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
592 if ( !JsonHelper::Member_FromJson(json, flags,
"hold", data.hold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
593 if ( !JsonHelper::Member_FromJson(json, flags,
"pk", data.pk, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
597 static bool ToJson(JSON_Value &json,
const json_band_peakhold& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
599 if (json.IsNull ()) {
601 flags &= ~JSON_CVT_ONLYREQ;
602 }
else if (!json.IsObject()) {
603 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
606 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hold", data.hold))
return false;
607 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"pk", data.pk))
return false;
608 if (json.MemberCount()==0) json.SetNull();
614 if (json.IsNull ()) {
616 flags &= ~JSON_CVT_ONLYREQ;
617 }
else if (!json.IsObject()) {
618 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
621 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hold", data.hold, ref.hold))
return false;
622 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"pk", data.pk, ref.pk))
return false;
623 if (json.MemberCount()==0) json.SetNull();
628 JsonHelper::Member_ForceChange(allocator,
"hold", data.hold, ref.hold);
629 JsonHelper::Member_ForceChange(allocator,
"pk", data.pk, ref.pk);
638 static bool FromJson(
const JSON_Value& json,
json_bandlim_peakhold& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_bandlim_peakhold> &constraints = JsonConstraint<json_bandlim_peakhold>()) {
640 if (json.IsNull()) {
return true; }
641 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
642 if ( !JsonHelper::Member_FromJson(json, flags,
"hold", data.hold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
643 if ( !JsonHelper::Member_FromJson(json, flags,
"pk", data.pk, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
647 static bool ToJson(JSON_Value &json,
const json_bandlim_peakhold& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
649 if (json.IsNull ()) {
651 flags &= ~JSON_CVT_ONLYREQ;
652 }
else if (!json.IsObject()) {
653 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
656 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hold", data.hold))
return false;
657 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"pk", data.pk))
return false;
658 if (json.MemberCount()==0) json.SetNull();
664 if (json.IsNull ()) {
666 flags &= ~JSON_CVT_ONLYREQ;
667 }
else if (!json.IsObject()) {
668 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
671 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hold", data.hold, ref.hold))
return false;
672 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"pk", data.pk, ref.pk))
return false;
673 if (json.MemberCount()==0) json.SetNull();
678 JsonHelper::Member_ForceChange(allocator,
"hold", data.hold, ref.hold);
679 JsonHelper::Member_ForceChange(allocator,
"pk", data.pk, ref.pk);
692 static bool FromJson(
const JSON_Value& json,
json_preset_setup& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_preset_setup> &constraints = JsonConstraint<json_preset_setup>()) {
694 if (json.IsNull()) {
return true; }
695 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
696 if ( !JsonHelper::Member_FromJson(json, flags,
"gate_on", data.gate_on, allocator))
return false;
697 if ( !JsonHelper::Member_FromJson(json, flags,
"gate", data.gate, allocator, JsonConstraint<S4Float>(-100,0)))
return false;
698 if ( !JsonHelper::Member_FromJson(json, flags,
"hp_on", data.hp_on, allocator))
return false;
699 if ( !JsonHelper::Member_FromJson(json, flags,
"hp_freq", data.hp_freq, allocator, JsonConstraint<S4Float>(10,200)))
return false;
700 if ( !JsonHelper::Member_FromJson(json, flags,
"stereo_link", data.stereo_link, allocator))
return false;
701 if ( !JsonHelper::Member_FromJson(json, flags,
"display_agc", data.display_agc, allocator))
return false;
702 if ( !JsonHelper::Member_FromJson(json, flags,
"display_tonefx", data.display_tonefx, allocator))
return false;
703 if ( !JsonHelper::Member_FromJson(json, flags,
"display_stereofx", data.display_stereofx, allocator))
return false;
704 if ( !JsonHelper::Member_FromJson(json, flags,
"display_bandprocess", data.display_bandprocess, allocator))
return false;
705 if ( !JsonHelper::Member_FromJson(json, flags,
"display_bandlimiter", data.display_bandlimiter, allocator))
return false;
709 static bool ToJson(JSON_Value &json,
const json_preset_setup& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
711 if (json.IsNull ()) {
713 flags &= ~JSON_CVT_ONLYREQ;
714 }
else if (!json.IsObject()) {
715 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
718 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gate_on", data.gate_on))
return false;
719 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gate", data.gate))
return false;
720 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hp_on", data.hp_on))
return false;
721 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hp_freq", data.hp_freq))
return false;
722 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"stereo_link", data.stereo_link))
return false;
723 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"display_agc", data.display_agc))
return false;
724 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"display_tonefx", data.display_tonefx))
return false;
725 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"display_stereofx", data.display_stereofx))
return false;
726 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"display_bandprocess", data.display_bandprocess))
return false;
727 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"display_bandlimiter", data.display_bandlimiter))
return false;
728 if (json.MemberCount()==0) json.SetNull();
734 if (json.IsNull ()) {
736 flags &= ~JSON_CVT_ONLYREQ;
737 }
else if (!json.IsObject()) {
738 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
741 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gate_on", data.gate_on, ref.gate_on))
return false;
742 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gate", data.gate, ref.gate))
return false;
743 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hp_on", data.hp_on, ref.hp_on))
return false;
744 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hp_freq", data.hp_freq, ref.hp_freq))
return false;
745 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"stereo_link", data.stereo_link, ref.stereo_link))
return false;
746 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"display_agc", data.display_agc, ref.display_agc))
return false;
747 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"display_tonefx", data.display_tonefx, ref.display_tonefx))
return false;
748 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"display_stereofx", data.display_stereofx, ref.display_stereofx))
return false;
749 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"display_bandprocess", data.display_bandprocess, ref.display_bandprocess))
return false;
750 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"display_bandlimiter", data.display_bandlimiter, ref.display_bandlimiter))
return false;
751 if (json.MemberCount()==0) json.SetNull();
756 JsonHelper::Member_ForceChange(allocator,
"gate_on", data.gate_on, ref.gate_on);
757 JsonHelper::Member_ForceChange(allocator,
"gate", data.gate, ref.gate);
758 JsonHelper::Member_ForceChange(allocator,
"hp_on", data.hp_on, ref.hp_on);
759 JsonHelper::Member_ForceChange(allocator,
"hp_freq", data.hp_freq, ref.hp_freq);
760 JsonHelper::Member_ForceChange(allocator,
"stereo_link", data.stereo_link, ref.stereo_link);
761 JsonHelper::Member_ForceChange(allocator,
"display_agc", data.display_agc, ref.display_agc);
762 JsonHelper::Member_ForceChange(allocator,
"display_tonefx", data.display_tonefx, ref.display_tonefx);
763 JsonHelper::Member_ForceChange(allocator,
"display_stereofx", data.display_stereofx, ref.display_stereofx);
764 JsonHelper::Member_ForceChange(allocator,
"display_bandprocess", data.display_bandprocess, ref.display_bandprocess);
765 JsonHelper::Member_ForceChange(allocator,
"display_bandlimiter", data.display_bandlimiter, ref.display_bandlimiter);
775 static bool ToJson(JSON_Value &json,
const jsonvu_preset_setup& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
777 if (json.IsNull ()) {
779 flags &= ~JSON_CVT_ONLYREQ;
780 }
else if (!json.IsObject()) {
781 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
784 if (json.MemberCount()==0) json.SetNull();
790 if (json.IsNull ()) {
792 flags &= ~JSON_CVT_ONLYREQ;
793 }
else if (!json.IsObject()) {
794 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
797 if (json.MemberCount()==0) json.SetNull();
810 static bool FromJson(
const JSON_Value& json,
json_input& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_input> &constraints = JsonConstraint<json_input>()) {
812 if (json.IsNull()) {
return true; }
813 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
817 static bool ToJson(JSON_Value &json,
const json_input& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
819 if (json.IsNull ()) {
821 flags &= ~JSON_CVT_ONLYREQ;
822 }
else if (!json.IsObject()) {
823 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
826 if (json.MemberCount()==0) json.SetNull();
830 static bool DiffToJson(JSON_Value &json,
const json_input& data [[maybe_unused]],
json_input& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
832 if (json.IsNull ()) {
834 flags &= ~JSON_CVT_ONLYREQ;
835 }
else if (!json.IsObject()) {
836 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
839 if (json.MemberCount()==0) json.SetNull();
853 static bool ToJson(JSON_Value &json,
const jsonvu_input& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
855 if (json.IsNull ()) {
857 flags &= ~JSON_CVT_ONLYREQ;
858 }
else if (!json.IsObject()) {
859 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
862 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vu", data.vu))
return false;
863 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"standby", data.standby))
return false;
864 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vuout", data.vuout))
return false;
865 if ((flags & JSON_CVT_WITHDEV) &&
866 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_moment", data.bs_moment))
return false;
867 if ((flags & JSON_CVT_WITHDEV) &&
868 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_short", data.bs_short))
return false;
869 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bs_long", data.bs_long))
return false;
870 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bs_user", data.bs_user))
return false;
871 if ((flags & JSON_CVT_WITHDEV) &&
872 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_psr", data.bs_psr))
return false;
873 if ((flags & JSON_CVT_WITHDEV) &&
874 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_plr", data.bs_plr))
return false;
875 if (json.MemberCount()==0) json.SetNull();
879 static bool DiffToJson(JSON_Value &json,
const jsonvu_input& data [[maybe_unused]],
jsonvu_input& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
881 if (json.IsNull ()) {
883 flags &= ~JSON_CVT_ONLYREQ;
884 }
else if (!json.IsObject()) {
885 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
888 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vu", data.vu, ref.vu))
return false;
889 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"standby", data.standby, ref.standby))
return false;
890 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vuout", data.vuout, ref.vuout))
return false;
891 if ((flags & JSON_CVT_WITHDEV) &&
892 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_moment", data.bs_moment, ref.bs_moment))
return false;
893 if ((flags & JSON_CVT_WITHDEV) &&
894 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_short", data.bs_short, ref.bs_short))
return false;
895 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_long", data.bs_long, ref.bs_long))
return false;
896 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_user", data.bs_user, ref.bs_user))
return false;
897 if ((flags & JSON_CVT_WITHDEV) &&
898 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_psr", data.bs_psr, ref.bs_psr))
return false;
899 if ((flags & JSON_CVT_WITHDEV) &&
900 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_plr", data.bs_plr, ref.bs_plr))
return false;
901 if (json.MemberCount()==0) json.SetNull();
906 JsonHelper::Member_ForceChange(allocator,
"vu", data.vu, ref.vu);
907 JsonHelper::Member_ForceChange(allocator,
"standby", data.standby, ref.standby);
908 JsonHelper::Member_ForceChange(allocator,
"vuout", data.vuout, ref.vuout);
909 JsonHelper::Member_ForceChange(allocator,
"bs_moment", data.bs_moment, ref.bs_moment);
910 JsonHelper::Member_ForceChange(allocator,
"bs_short", data.bs_short, ref.bs_short);
911 JsonHelper::Member_ForceChange(allocator,
"bs_long", data.bs_long, ref.bs_long);
912 JsonHelper::Member_ForceChange(allocator,
"bs_user", data.bs_user, ref.bs_user);
913 JsonHelper::Member_ForceChange(allocator,
"bs_psr", data.bs_psr, ref.bs_psr);
914 JsonHelper::Member_ForceChange(allocator,
"bs_plr", data.bs_plr, ref.bs_plr);
923 static bool FromJson(
const JSON_Value& json,
json_agc& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_agc> &constraints = JsonConstraint<json_agc>()) {
924 if (
sizeof(
json_agc)==0)
return true;
925 if (json.IsNull()) {
return true; }
926 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
927 if ( !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
928 if ( !JsonHelper::Member_FromJson(json, flags,
"hp_on", data.hp_on, allocator))
return false;
929 if ( !JsonHelper::Member_FromJson(json, flags,
"hp_freq", data.hp_freq, allocator, JsonConstraint<S4Float>(10,200)))
return false;
930 if ( !JsonHelper::Member_FromJson(json, flags,
"drive_on", data.drive_on, allocator))
return false;
931 if ( !JsonHelper::Member_FromJson(json, flags,
"drive", data.drive, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
932 if ((flags & JSON_CVT_WITHDEV) &&
933 !JsonHelper::Member_FromJson(json, flags,
"threshold", data.threshold, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
934 if ((flags & JSON_CVT_WITHDEV) &&
935 !JsonHelper::Member_FromJson(json, flags,
"postgain", data.postgain, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
936 if ((flags & JSON_CVT_WITHDEV) &&
937 !JsonHelper::Member_FromJson(json, flags,
"ratio", data.ratio, allocator, JsonConstraint<S4Float>(0,100)))
return false;
938 if ( !JsonHelper::Member_FromJson(json, flags,
"attack", data.attack, allocator, JsonConstraint<S4Float>(5,50)))
return false;
939 if ( !JsonHelper::Member_FromJson(json, flags,
"release", data.release, allocator, JsonConstraint<S4Float>(0.5,30)))
return false;
940 if ((flags & JSON_CVT_WITHDEV) &&
941 !JsonHelper::Member_FromJson(json, flags,
"impact", data.impact, allocator, JsonConstraint<S4Float>(0,10)))
return false;
945 static bool ToJson(JSON_Value &json,
const json_agc& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
946 if (
sizeof(
json_agc)==0)
return true;
947 if (json.IsNull ()) {
949 flags &= ~JSON_CVT_ONLYREQ;
950 }
else if (!json.IsObject()) {
951 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
954 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
955 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hp_on", data.hp_on))
return false;
956 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"hp_freq", data.hp_freq))
return false;
957 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"drive_on", data.drive_on))
return false;
958 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"drive", data.drive))
return false;
959 if ((flags & JSON_CVT_WITHDEV) &&
960 !JsonHelper::Member_ToJson(json, flags, allocator,
"threshold", data.threshold))
return false;
961 if ((flags & JSON_CVT_WITHDEV) &&
962 !JsonHelper::Member_ToJson(json, flags, allocator,
"postgain", data.postgain))
return false;
963 if ((flags & JSON_CVT_WITHDEV) &&
964 !JsonHelper::Member_ToJson(json, flags, allocator,
"ratio", data.ratio))
return false;
965 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"attack", data.attack))
return false;
966 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"release", data.release))
return false;
967 if ((flags & JSON_CVT_WITHDEV) &&
968 !JsonHelper::Member_ToJson(json, flags, allocator,
"impact", data.impact))
return false;
969 if (json.MemberCount()==0) json.SetNull();
973 static bool DiffToJson(JSON_Value &json,
const json_agc& data [[maybe_unused]],
json_agc& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
974 if (
sizeof(
json_agc)==0)
return true;
975 if (json.IsNull ()) {
977 flags &= ~JSON_CVT_ONLYREQ;
978 }
else if (!json.IsObject()) {
979 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
982 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
983 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hp_on", data.hp_on, ref.hp_on))
return false;
984 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"hp_freq", data.hp_freq, ref.hp_freq))
return false;
985 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive_on", data.drive_on, ref.drive_on))
return false;
986 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive", data.drive, ref.drive))
return false;
987 if ((flags & JSON_CVT_WITHDEV) &&
988 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"threshold", data.threshold, ref.threshold))
return false;
989 if ((flags & JSON_CVT_WITHDEV) &&
990 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"postgain", data.postgain, ref.postgain))
return false;
991 if ((flags & JSON_CVT_WITHDEV) &&
992 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"ratio", data.ratio, ref.ratio))
return false;
993 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"attack", data.attack, ref.attack))
return false;
994 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"release", data.release, ref.release))
return false;
995 if ((flags & JSON_CVT_WITHDEV) &&
996 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"impact", data.impact, ref.impact))
return false;
997 if (json.MemberCount()==0) json.SetNull();
1001 static void ForceChange(
const json_agc& data [[maybe_unused]],
json_agc& ref [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1002 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
1003 JsonHelper::Member_ForceChange(allocator,
"hp_on", data.hp_on, ref.hp_on);
1004 JsonHelper::Member_ForceChange(allocator,
"hp_freq", data.hp_freq, ref.hp_freq);
1005 JsonHelper::Member_ForceChange(allocator,
"drive_on", data.drive_on, ref.drive_on);
1006 JsonHelper::Member_ForceChange(allocator,
"drive", data.drive, ref.drive);
1007 JsonHelper::Member_ForceChange(allocator,
"threshold", data.threshold, ref.threshold);
1008 JsonHelper::Member_ForceChange(allocator,
"postgain", data.postgain, ref.postgain);
1009 JsonHelper::Member_ForceChange(allocator,
"ratio", data.ratio, ref.ratio);
1010 JsonHelper::Member_ForceChange(allocator,
"attack", data.attack, ref.attack);
1011 JsonHelper::Member_ForceChange(allocator,
"release", data.release, ref.release);
1012 JsonHelper::Member_ForceChange(allocator,
"impact", data.impact, ref.impact);
1022 static bool ToJson(JSON_Value &json,
const jsonvu_agc& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1024 if (json.IsNull ()) {
1026 flags &= ~JSON_CVT_ONLYREQ;
1027 }
else if (!json.IsObject()) {
1028 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1031 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vu", data.vu))
return false;
1032 if (json.MemberCount()==0) json.SetNull();
1036 static bool DiffToJson(JSON_Value &json,
const jsonvu_agc& data [[maybe_unused]],
jsonvu_agc& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1038 if (json.IsNull ()) {
1040 flags &= ~JSON_CVT_ONLYREQ;
1041 }
else if (!json.IsObject()) {
1042 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1045 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vu", data.vu, ref.vu))
return false;
1046 if (json.MemberCount()==0) json.SetNull();
1051 JsonHelper::Member_ForceChange(allocator,
"vu", data.vu, ref.vu);
1060 static bool FromJson(
const JSON_Value& json,
json_tonefx& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_tonefx> &constraints = JsonConstraint<json_tonefx>()) {
1062 if (json.IsNull()) {
return true; }
1063 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
1064 if ( !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
1065 if ( !JsonHelper::Member_FromJson(json, flags,
"eq_on", data.eq_on, allocator))
return false;
1066 if ( !JsonHelper::Member_FromJson(json, flags,
"eq_freq", data.eq_freq, allocator, JsonConstraint<S4Float>(20,20000)))
return false;
1067 if ( !JsonHelper::Member_FromJson(json, flags,
"eq_Q", data.eq_Q, allocator, JsonConstraint<S4Float>(0.01,60.)))
return false;
1068 if ( !JsonHelper::Member_FromJson(json, flags,
"eq_gain", data.eq_gain, allocator, JsonConstraint<S4Float>(-12,12)))
return false;
1069 if ( !JsonHelper::Member_FromJson(json, flags,
"bass_on", data.bass_on, allocator))
return false;
1070 if ( !JsonHelper::Member_FromJson(json, flags,
"bass_gain", data.bass_gain, allocator, JsonConstraint<S4Float>(0,20)))
return false;
1071 if ((flags & JSON_CVT_WITHDEV) &&
1072 !JsonHelper::Member_FromJson(json, flags,
"bass_freq", data.bass_freq, allocator, JsonConstraint<S4Float>(20,20000)))
return false;
1073 if ( !JsonHelper::Member_FromJson(json, flags,
"treble_on", data.treble_on, allocator))
return false;
1074 if ( !JsonHelper::Member_FromJson(json, flags,
"treble_value", data.treble_value, allocator, JsonConstraint<S4Float>(0,20)))
return false;
1075 if ((flags & JSON_CVT_WITHDEV) &&
1076 !JsonHelper::Member_FromJson(json, flags,
"treble_range", data.treble_range, allocator, JsonConstraint<S4Float>(0,100)))
return false;
1080 static bool ToJson(JSON_Value &json,
const json_tonefx& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1082 if (json.IsNull ()) {
1084 flags &= ~JSON_CVT_ONLYREQ;
1085 }
else if (!json.IsObject()) {
1086 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1089 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
1090 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"eq_on", data.eq_on))
return false;
1091 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"eq_freq", data.eq_freq))
return false;
1092 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"eq_Q", data.eq_Q))
return false;
1093 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"eq_gain", data.eq_gain))
return false;
1094 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bass_on", data.bass_on))
return false;
1095 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bass_gain", data.bass_gain))
return false;
1096 if ((flags & JSON_CVT_WITHDEV) &&
1097 !JsonHelper::Member_ToJson(json, flags, allocator,
"bass_freq", data.bass_freq))
return false;
1098 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"treble_on", data.treble_on))
return false;
1099 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"treble_value", data.treble_value))
return false;
1100 if ((flags & JSON_CVT_WITHDEV) &&
1101 !JsonHelper::Member_ToJson(json, flags, allocator,
"treble_range", data.treble_range))
return false;
1102 if (json.MemberCount()==0) json.SetNull();
1106 static bool DiffToJson(JSON_Value &json,
const json_tonefx& data [[maybe_unused]],
json_tonefx& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1108 if (json.IsNull ()) {
1110 flags &= ~JSON_CVT_ONLYREQ;
1111 }
else if (!json.IsObject()) {
1112 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1115 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
1116 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"eq_on", data.eq_on, ref.eq_on))
return false;
1117 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"eq_freq", data.eq_freq, ref.eq_freq))
return false;
1118 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"eq_Q", data.eq_Q, ref.eq_Q))
return false;
1119 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"eq_gain", data.eq_gain, ref.eq_gain))
return false;
1120 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bass_on", data.bass_on, ref.bass_on))
return false;
1121 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bass_gain", data.bass_gain, ref.bass_gain))
return false;
1122 if ((flags & JSON_CVT_WITHDEV) &&
1123 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bass_freq", data.bass_freq, ref.bass_freq))
return false;
1124 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"treble_on", data.treble_on, ref.treble_on))
return false;
1125 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"treble_value", data.treble_value, ref.treble_value))
return false;
1126 if ((flags & JSON_CVT_WITHDEV) &&
1127 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"treble_range", data.treble_range, ref.treble_range))
return false;
1128 if (json.MemberCount()==0) json.SetNull();
1133 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
1134 JsonHelper::Member_ForceChange(allocator,
"eq_on", data.eq_on, ref.eq_on);
1135 JsonHelper::Member_ForceChange(allocator,
"eq_freq", data.eq_freq, ref.eq_freq);
1136 JsonHelper::Member_ForceChange(allocator,
"eq_Q", data.eq_Q, ref.eq_Q);
1137 JsonHelper::Member_ForceChange(allocator,
"eq_gain", data.eq_gain, ref.eq_gain);
1138 JsonHelper::Member_ForceChange(allocator,
"bass_on", data.bass_on, ref.bass_on);
1139 JsonHelper::Member_ForceChange(allocator,
"bass_gain", data.bass_gain, ref.bass_gain);
1140 JsonHelper::Member_ForceChange(allocator,
"bass_freq", data.bass_freq, ref.bass_freq);
1141 JsonHelper::Member_ForceChange(allocator,
"treble_on", data.treble_on, ref.treble_on);
1142 JsonHelper::Member_ForceChange(allocator,
"treble_value", data.treble_value, ref.treble_value);
1143 JsonHelper::Member_ForceChange(allocator,
"treble_range", data.treble_range, ref.treble_range);
1153 static bool ToJson(JSON_Value &json,
const jsonvu_tonefx& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1155 if (json.IsNull ()) {
1157 flags &= ~JSON_CVT_ONLYREQ;
1158 }
else if (!json.IsObject()) {
1159 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1162 if (json.MemberCount()==0) json.SetNull();
1168 if (json.IsNull ()) {
1170 flags &= ~JSON_CVT_ONLYREQ;
1171 }
else if (!json.IsObject()) {
1172 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1175 if (json.MemberCount()==0) json.SetNull();
1188 static bool FromJson(
const JSON_Value& json,
json_stereofx& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_stereofx> &constraints = JsonConstraint<json_stereofx>()) {
1190 if (json.IsNull()) {
return true; }
1191 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
1192 if ( !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
1193 if ( !JsonHelper::Member_FromJson(json, flags,
"enh_on", data.enh_on, allocator))
return false;
1194 if ( !JsonHelper::Member_FromJson(json, flags,
"enh_width", data.enh_width, allocator, JsonConstraint<S4Float>(0,100)))
return false;
1195 if ((flags & JSON_CVT_WITHDEV) &&
1196 !JsonHelper::Member_FromJson(json, flags,
"enh_attack", data.enh_attack, allocator, JsonConstraint<S4Float>(0,100.00)))
return false;
1197 if ((flags & JSON_CVT_WITHDEV) &&
1198 !JsonHelper::Member_FromJson(json, flags,
"enh_release", data.enh_release, allocator, JsonConstraint<S4Float>(0,100.00)))
return false;
1199 if ((flags & JSON_CVT_WITHDEV) &&
1200 !JsonHelper::Member_FromJson(json, flags,
"enh_threshold", data.enh_threshold, allocator, JsonConstraint<S4Float>(-100,0)))
return false;
1201 if ((flags & JSON_CVT_WITHDEV) &&
1202 !JsonHelper::Member_FromJson(json, flags,
"enh_thresLR", data.enh_thresLR, allocator, JsonConstraint<S4Float>(-100,0)))
return false;
1203 if ( !JsonHelper::Member_FromJson(json, flags,
"lim_on", data.lim_on, allocator))
return false;
1204 if ( !JsonHelper::Member_FromJson(json, flags,
"lim_threshold", data.lim_threshold, allocator, JsonConstraint<S4Float>(0,100)))
return false;
1205 if ((flags & JSON_CVT_WITHDEV) &&
1206 !JsonHelper::Member_FromJson(json, flags,
"lim_release", data.lim_release, allocator, JsonConstraint<S4Float>(0,50.00)))
return false;
1210 static bool ToJson(JSON_Value &json,
const json_stereofx& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1212 if (json.IsNull ()) {
1214 flags &= ~JSON_CVT_ONLYREQ;
1215 }
else if (!json.IsObject()) {
1216 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1219 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
1220 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"enh_on", data.enh_on))
return false;
1221 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"enh_width", data.enh_width))
return false;
1222 if ((flags & JSON_CVT_WITHDEV) &&
1223 !JsonHelper::Member_ToJson(json, flags, allocator,
"enh_attack", data.enh_attack))
return false;
1224 if ((flags & JSON_CVT_WITHDEV) &&
1225 !JsonHelper::Member_ToJson(json, flags, allocator,
"enh_release", data.enh_release))
return false;
1226 if ((flags & JSON_CVT_WITHDEV) &&
1227 !JsonHelper::Member_ToJson(json, flags, allocator,
"enh_threshold", data.enh_threshold))
return false;
1228 if ((flags & JSON_CVT_WITHDEV) &&
1229 !JsonHelper::Member_ToJson(json, flags, allocator,
"enh_thresLR", data.enh_thresLR))
return false;
1230 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lim_on", data.lim_on))
return false;
1231 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lim_threshold", data.lim_threshold))
return false;
1232 if ((flags & JSON_CVT_WITHDEV) &&
1233 !JsonHelper::Member_ToJson(json, flags, allocator,
"lim_release", data.lim_release))
return false;
1234 if (json.MemberCount()==0) json.SetNull();
1240 if (json.IsNull ()) {
1242 flags &= ~JSON_CVT_ONLYREQ;
1243 }
else if (!json.IsObject()) {
1244 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1247 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
1248 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_on", data.enh_on, ref.enh_on))
return false;
1249 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_width", data.enh_width, ref.enh_width))
return false;
1250 if ((flags & JSON_CVT_WITHDEV) &&
1251 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_attack", data.enh_attack, ref.enh_attack))
return false;
1252 if ((flags & JSON_CVT_WITHDEV) &&
1253 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_release", data.enh_release, ref.enh_release))
return false;
1254 if ((flags & JSON_CVT_WITHDEV) &&
1255 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_threshold", data.enh_threshold, ref.enh_threshold))
return false;
1256 if ((flags & JSON_CVT_WITHDEV) &&
1257 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_thresLR", data.enh_thresLR, ref.enh_thresLR))
return false;
1258 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lim_on", data.lim_on, ref.lim_on))
return false;
1259 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lim_threshold", data.lim_threshold, ref.lim_threshold))
return false;
1260 if ((flags & JSON_CVT_WITHDEV) &&
1261 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lim_release", data.lim_release, ref.lim_release))
return false;
1262 if (json.MemberCount()==0) json.SetNull();
1267 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
1268 JsonHelper::Member_ForceChange(allocator,
"enh_on", data.enh_on, ref.enh_on);
1269 JsonHelper::Member_ForceChange(allocator,
"enh_width", data.enh_width, ref.enh_width);
1270 JsonHelper::Member_ForceChange(allocator,
"enh_attack", data.enh_attack, ref.enh_attack);
1271 JsonHelper::Member_ForceChange(allocator,
"enh_release", data.enh_release, ref.enh_release);
1272 JsonHelper::Member_ForceChange(allocator,
"enh_threshold", data.enh_threshold, ref.enh_threshold);
1273 JsonHelper::Member_ForceChange(allocator,
"enh_thresLR", data.enh_thresLR, ref.enh_thresLR);
1274 JsonHelper::Member_ForceChange(allocator,
"lim_on", data.lim_on, ref.lim_on);
1275 JsonHelper::Member_ForceChange(allocator,
"lim_threshold", data.lim_threshold, ref.lim_threshold);
1276 JsonHelper::Member_ForceChange(allocator,
"lim_release", data.lim_release, ref.lim_release);
1286 static bool ToJson(JSON_Value &json,
const jsonvu_stereofx& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1288 if (json.IsNull ()) {
1290 flags &= ~JSON_CVT_ONLYREQ;
1291 }
else if (!json.IsObject()) {
1292 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1295 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"enh_vu", data.enh_vu))
return false;
1296 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lim_vu", data.lim_vu))
return false;
1297 if (json.MemberCount()==0) json.SetNull();
1303 if (json.IsNull ()) {
1305 flags &= ~JSON_CVT_ONLYREQ;
1306 }
else if (!json.IsObject()) {
1307 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1310 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"enh_vu", data.enh_vu, ref.enh_vu))
return false;
1311 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lim_vu", data.lim_vu, ref.lim_vu))
return false;
1312 if (json.MemberCount()==0) json.SetNull();
1317 JsonHelper::Member_ForceChange(allocator,
"enh_vu", data.enh_vu, ref.enh_vu);
1318 JsonHelper::Member_ForceChange(allocator,
"lim_vu", data.lim_vu, ref.lim_vu);
1327 static bool FromJson(
const JSON_Value& json,
json_bandprocess& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_bandprocess> &constraints = JsonConstraint<json_bandprocess>()) {
1329 if (json.IsNull()) {
return true; }
1330 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
1331 if ( !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
1332 if ( !JsonHelper::Member_FromJson(json, flags,
"freq", data.freq, allocator, JsonConstraint<S4Float>(20,20000)))
return false;
1333 if ( !JsonHelper::Member_FromJson(json, flags,
"gate_on", data.gate_on, allocator))
return false;
1334 if ( !JsonHelper::Member_FromJson(json, flags,
"gate", data.gate, allocator, JsonConstraint<S4Float>(-70,0)))
return false;
1335 if ( !JsonHelper::Member_FromJson(json, flags,
"fidelity_on", data.fidelity_on, allocator))
return false;
1336 if ((flags & JSON_CVT_WITHDEV) &&
1337 !JsonHelper::Member_FromJson(json, flags,
"fidelity_speed", data.fidelity_speed, allocator, JsonConstraint<S4Float>(0.1,60)))
return false;
1338 if ( !JsonHelper::Member_FromJson(json, flags,
"fidelity", data.fidelity, allocator, JsonConstraint<S4Float>(0,100)))
return false;
1339 if ( !JsonHelper::Member_FromJson(json, flags,
"drive_on", data.drive_on, allocator))
return false;
1340 if ( !JsonHelper::Member_FromJson(json, flags,
"drive", data.drive, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
1341 if ( !JsonHelper::Member_FromJson(json, flags,
"threshold_on", data.threshold_on, allocator))
return false;
1342 if ( !JsonHelper::Member_FromJson(json, flags,
"threshold", data.threshold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
1343 if ((flags & JSON_CVT_WITHDEV) &&
1344 !JsonHelper::Member_FromJson(json, flags,
"base_thres", data.base_thres, allocator, JsonConstraint<S4Float>(-30,0)))
return false;
1345 if ( !JsonHelper::Member_FromJson(json, flags,
"ratio", data.ratio, allocator, JsonConstraint<S4Float>(0,100)))
return false;
1346 if ( !JsonHelper::Member_FromJson(json, flags,
"impact_on", data.impact_on, allocator))
return false;
1347 if ( !JsonHelper::Member_FromJson(json, flags,
"impact", data.impact, allocator, JsonConstraint<S4Float>(0,10)))
return false;
1348 if ((flags & JSON_CVT_WITHDEV) &&
1349 !JsonHelper::Member_FromJson(json, flags,
"postgain", data.postgain, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
1350 if ( !JsonHelper::Member_FromJson(json, flags,
"attack", data.attack, allocator, JsonConstraint<S4Float>(0,1000)))
return false;
1351 if ( !JsonHelper::Member_FromJson(json, flags,
"release", data.release, allocator, JsonConstraint<S4Float>(0,100)))
return false;
1352 if ((flags & JSON_CVT_WITHDEV) &&
1353 !JsonHelper::Member_FromJson(json, flags,
"avgspeed", data.avgspeed, allocator, JsonConstraint<S4Float>(0.1,60)))
return false;
1354 if ((flags & JSON_CVT_WITHDEV) &&
1355 !JsonHelper::Member_FromJson(json, flags,
"delta_up", data.delta_up, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
1356 if ((flags & JSON_CVT_WITHDEV) &&
1357 !JsonHelper::Member_FromJson(json, flags,
"attack_up", data.attack_up, allocator, JsonConstraint<S4Float>(0,32000)))
return false;
1358 if ((flags & JSON_CVT_WITHDEV) &&
1359 !JsonHelper::Member_FromJson(json, flags,
"release_up", data.release_up, allocator, JsonConstraint<S4Float>(0,320)))
return false;
1360 if ((flags & JSON_CVT_WITHDEV) &&
1361 !JsonHelper::Member_FromJson(json, flags,
"delta_dn", data.delta_dn, allocator, JsonConstraint<S4Float>(-100,0)))
return false;
1362 if ((flags & JSON_CVT_WITHDEV) &&
1363 !JsonHelper::Member_FromJson(json, flags,
"attack_dn", data.attack_dn, allocator, JsonConstraint<S4Float>(0,32000)))
return false;
1364 if ((flags & JSON_CVT_WITHDEV) &&
1365 !JsonHelper::Member_FromJson(json, flags,
"release_dn", data.release_dn, allocator, JsonConstraint<S4Float>(0,320)))
return false;
1366 if ( !JsonHelper::Member_FromJson(json, flags,
"listen", data.listen, allocator, JsonConstraint<int>(0,3)))
return false;
1370 static bool ToJson(JSON_Value &json,
const json_bandprocess& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1372 if (json.IsNull ()) {
1374 flags &= ~JSON_CVT_ONLYREQ;
1375 }
else if (!json.IsObject()) {
1376 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1379 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
1380 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"freq", data.freq))
return false;
1381 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gate_on", data.gate_on))
return false;
1382 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gate", data.gate))
return false;
1383 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"fidelity_on", data.fidelity_on))
return false;
1384 if ((flags & JSON_CVT_WITHDEV) &&
1385 !JsonHelper::Member_ToJson(json, flags, allocator,
"fidelity_speed", data.fidelity_speed))
return false;
1386 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"fidelity", data.fidelity))
return false;
1387 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"drive_on", data.drive_on))
return false;
1388 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"drive", data.drive))
return false;
1389 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"threshold_on", data.threshold_on))
return false;
1390 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"threshold", data.threshold))
return false;
1391 if ((flags & JSON_CVT_WITHDEV) &&
1392 !JsonHelper::Member_ToJson(json, flags, allocator,
"base_thres", data.base_thres))
return false;
1393 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"ratio", data.ratio))
return false;
1394 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"impact_on", data.impact_on))
return false;
1395 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"impact", data.impact))
return false;
1396 if ((flags & JSON_CVT_WITHDEV) &&
1397 !JsonHelper::Member_ToJson(json, flags, allocator,
"postgain", data.postgain))
return false;
1398 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"attack", data.attack))
return false;
1399 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"release", data.release))
return false;
1400 if ((flags & JSON_CVT_WITHDEV) &&
1401 !JsonHelper::Member_ToJson(json, flags, allocator,
"avgspeed", data.avgspeed))
return false;
1402 if ((flags & JSON_CVT_WITHDEV) &&
1403 !JsonHelper::Member_ToJson(json, flags, allocator,
"delta_up", data.delta_up))
return false;
1404 if ((flags & JSON_CVT_WITHDEV) &&
1405 !JsonHelper::Member_ToJson(json, flags, allocator,
"attack_up", data.attack_up))
return false;
1406 if ((flags & JSON_CVT_WITHDEV) &&
1407 !JsonHelper::Member_ToJson(json, flags, allocator,
"release_up", data.release_up))
return false;
1408 if ((flags & JSON_CVT_WITHDEV) &&
1409 !JsonHelper::Member_ToJson(json, flags, allocator,
"delta_dn", data.delta_dn))
return false;
1410 if ((flags & JSON_CVT_WITHDEV) &&
1411 !JsonHelper::Member_ToJson(json, flags, allocator,
"attack_dn", data.attack_dn))
return false;
1412 if ((flags & JSON_CVT_WITHDEV) &&
1413 !JsonHelper::Member_ToJson(json, flags, allocator,
"release_dn", data.release_dn))
return false;
1414 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"listen", data.listen))
return false;
1415 if (json.MemberCount()==0) json.SetNull();
1421 if (json.IsNull ()) {
1423 flags &= ~JSON_CVT_ONLYREQ;
1424 }
else if (!json.IsObject()) {
1425 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1428 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
1429 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"freq", data.freq, ref.freq))
return false;
1430 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gate_on", data.gate_on, ref.gate_on))
return false;
1431 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gate", data.gate, ref.gate))
return false;
1432 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"fidelity_on", data.fidelity_on, ref.fidelity_on))
return false;
1433 if ((flags & JSON_CVT_WITHDEV) &&
1434 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"fidelity_speed", data.fidelity_speed, ref.fidelity_speed))
return false;
1435 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"fidelity", data.fidelity, ref.fidelity))
return false;
1436 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive_on", data.drive_on, ref.drive_on))
return false;
1437 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive", data.drive, ref.drive))
return false;
1438 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"threshold_on", data.threshold_on, ref.threshold_on))
return false;
1439 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"threshold", data.threshold, ref.threshold))
return false;
1440 if ((flags & JSON_CVT_WITHDEV) &&
1441 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"base_thres", data.base_thres, ref.base_thres))
return false;
1442 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"ratio", data.ratio, ref.ratio))
return false;
1443 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"impact_on", data.impact_on, ref.impact_on))
return false;
1444 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"impact", data.impact, ref.impact))
return false;
1445 if ((flags & JSON_CVT_WITHDEV) &&
1446 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"postgain", data.postgain, ref.postgain))
return false;
1447 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"attack", data.attack, ref.attack))
return false;
1448 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"release", data.release, ref.release))
return false;
1449 if ((flags & JSON_CVT_WITHDEV) &&
1450 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"avgspeed", data.avgspeed, ref.avgspeed))
return false;
1451 if ((flags & JSON_CVT_WITHDEV) &&
1452 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"delta_up", data.delta_up, ref.delta_up))
return false;
1453 if ((flags & JSON_CVT_WITHDEV) &&
1454 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"attack_up", data.attack_up, ref.attack_up))
return false;
1455 if ((flags & JSON_CVT_WITHDEV) &&
1456 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"release_up", data.release_up, ref.release_up))
return false;
1457 if ((flags & JSON_CVT_WITHDEV) &&
1458 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"delta_dn", data.delta_dn, ref.delta_dn))
return false;
1459 if ((flags & JSON_CVT_WITHDEV) &&
1460 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"attack_dn", data.attack_dn, ref.attack_dn))
return false;
1461 if ((flags & JSON_CVT_WITHDEV) &&
1462 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"release_dn", data.release_dn, ref.release_dn))
return false;
1463 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"listen", data.listen, ref.listen))
return false;
1464 if (json.MemberCount()==0) json.SetNull();
1469 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
1470 JsonHelper::Member_ForceChange(allocator,
"freq", data.freq, ref.freq);
1471 JsonHelper::Member_ForceChange(allocator,
"gate_on", data.gate_on, ref.gate_on);
1472 JsonHelper::Member_ForceChange(allocator,
"gate", data.gate, ref.gate);
1473 JsonHelper::Member_ForceChange(allocator,
"fidelity_on", data.fidelity_on, ref.fidelity_on);
1474 JsonHelper::Member_ForceChange(allocator,
"fidelity_speed", data.fidelity_speed, ref.fidelity_speed);
1475 JsonHelper::Member_ForceChange(allocator,
"fidelity", data.fidelity, ref.fidelity);
1476 JsonHelper::Member_ForceChange(allocator,
"drive_on", data.drive_on, ref.drive_on);
1477 JsonHelper::Member_ForceChange(allocator,
"drive", data.drive, ref.drive);
1478 JsonHelper::Member_ForceChange(allocator,
"threshold_on", data.threshold_on, ref.threshold_on);
1479 JsonHelper::Member_ForceChange(allocator,
"threshold", data.threshold, ref.threshold);
1480 JsonHelper::Member_ForceChange(allocator,
"base_thres", data.base_thres, ref.base_thres);
1481 JsonHelper::Member_ForceChange(allocator,
"ratio", data.ratio, ref.ratio);
1482 JsonHelper::Member_ForceChange(allocator,
"impact_on", data.impact_on, ref.impact_on);
1483 JsonHelper::Member_ForceChange(allocator,
"impact", data.impact, ref.impact);
1484 JsonHelper::Member_ForceChange(allocator,
"postgain", data.postgain, ref.postgain);
1485 JsonHelper::Member_ForceChange(allocator,
"attack", data.attack, ref.attack);
1486 JsonHelper::Member_ForceChange(allocator,
"release", data.release, ref.release);
1487 JsonHelper::Member_ForceChange(allocator,
"avgspeed", data.avgspeed, ref.avgspeed);
1488 JsonHelper::Member_ForceChange(allocator,
"delta_up", data.delta_up, ref.delta_up);
1489 JsonHelper::Member_ForceChange(allocator,
"attack_up", data.attack_up, ref.attack_up);
1490 JsonHelper::Member_ForceChange(allocator,
"release_up", data.release_up, ref.release_up);
1491 JsonHelper::Member_ForceChange(allocator,
"delta_dn", data.delta_dn, ref.delta_dn);
1492 JsonHelper::Member_ForceChange(allocator,
"attack_dn", data.attack_dn, ref.attack_dn);
1493 JsonHelper::Member_ForceChange(allocator,
"release_dn", data.release_dn, ref.release_dn);
1494 JsonHelper::Member_ForceChange(allocator,
"listen", data.listen, ref.listen);
1504 static bool ToJson(JSON_Value &json,
const jsonvu_bandprocess& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1506 if (json.IsNull ()) {
1508 flags &= ~JSON_CVT_ONLYREQ;
1509 }
else if (!json.IsObject()) {
1510 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1513 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"in", data.in))
return false;
1514 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gated", data.gated))
return false;
1515 if ((flags & JSON_CVT_WITHDEV) &&
1516 !JsonHelper::Member_ToJson(json, flags, allocator,
"fidel", data.fidel))
return false;
1517 if ((flags & JSON_CVT_WITHDEV) &&
1518 !JsonHelper::Member_ToJson(json, flags, allocator,
"mes_in", data.mes_in))
return false;
1519 if ((flags & JSON_CVT_WITHDEV) &&
1520 !JsonHelper::Member_ToJson(json, flags, allocator,
"in_avg", data.in_avg))
return false;
1521 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gain", data.gain))
return false;
1522 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"out", data.out))
return false;
1523 if (json.MemberCount()==0) json.SetNull();
1529 if (json.IsNull ()) {
1531 flags &= ~JSON_CVT_ONLYREQ;
1532 }
else if (!json.IsObject()) {
1533 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1536 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"in", data.in, ref.in))
return false;
1537 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gated", data.gated, ref.gated))
return false;
1538 if ((flags & JSON_CVT_WITHDEV) &&
1539 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"fidel", data.fidel, ref.fidel))
return false;
1540 if ((flags & JSON_CVT_WITHDEV) &&
1541 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"mes_in", data.mes_in, ref.mes_in))
return false;
1542 if ((flags & JSON_CVT_WITHDEV) &&
1543 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"in_avg", data.in_avg, ref.in_avg))
return false;
1544 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gain", data.gain, ref.gain))
return false;
1545 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"out", data.out, ref.out))
return false;
1546 if (json.MemberCount()==0) json.SetNull();
1551 JsonHelper::Member_ForceChange(allocator,
"in", data.in, ref.in);
1552 JsonHelper::Member_ForceChange(allocator,
"gated", data.gated, ref.gated);
1553 JsonHelper::Member_ForceChange(allocator,
"fidel", data.fidel, ref.fidel);
1554 JsonHelper::Member_ForceChange(allocator,
"mes_in", data.mes_in, ref.mes_in);
1555 JsonHelper::Member_ForceChange(allocator,
"in_avg", data.in_avg, ref.in_avg);
1556 JsonHelper::Member_ForceChange(allocator,
"gain", data.gain, ref.gain);
1557 JsonHelper::Member_ForceChange(allocator,
"out", data.out, ref.out);
1566 static bool FromJson(
const JSON_Value& json,
json_bandlimiter& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_bandlimiter> &constraints = JsonConstraint<json_bandlimiter>()) {
1568 if (json.IsNull()) {
return true; }
1569 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
1570 if ((flags & JSON_CVT_WITHDEV) &&
1571 !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
1572 if ( !JsonHelper::Member_FromJson(json, flags,
"drive_on", data.drive_on, allocator))
return false;
1573 if ( !JsonHelper::Member_FromJson(json, flags,
"drive", data.drive, allocator, JsonConstraint<S4Float>(-8,8)))
return false;
1574 if ( !JsonHelper::Member_FromJson(json, flags,
"threshold_on", data.threshold_on, allocator))
return false;
1575 if ( !JsonHelper::Member_FromJson(json, flags,
"threshold", data.threshold, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
1576 if ((flags & JSON_CVT_WITHDEV) &&
1577 !JsonHelper::Member_FromJson(json, flags,
"base_thres", data.base_thres, allocator, JsonConstraint<S4Float>(-30,0)))
return false;
1578 if ((flags & JSON_CVT_WITHDEV) &&
1579 !JsonHelper::Member_FromJson(json, flags,
"postgain", data.postgain, allocator, JsonConstraint<S4Float>(-30,0)))
return false;
1580 if ( !JsonHelper::Member_FromJson(json, flags,
"mix_on", data.mix_on, allocator))
return false;
1581 if ( !JsonHelper::Member_FromJson(json, flags,
"mix", data.mix, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
1582 if ((flags & JSON_CVT_WITHDEV) &&
1583 !JsonHelper::Member_FromJson(json, flags,
"preview", data.preview, allocator, JsonConstraint<int>(1,32)))
return false;
1584 if ((flags & JSON_CVT_WITHDEV) &&
1585 !JsonHelper::Member_FromJson(json, flags,
"asymmetric", data.asymmetric, allocator))
return false;
1586 if ( !JsonHelper::Member_FromJson(json, flags,
"he_on", data.he_on, allocator))
return false;
1587 if ((flags & JSON_CVT_WITHDEV) &&
1588 !JsonHelper::Member_FromJson(json, flags,
"he_freq", data.he_freq, allocator, JsonConstraint<S4Float>(0.1,20.)))
return false;
1589 if ( !JsonHelper::Member_FromJson(json, flags,
"he_drive_on", data.he_drive_on, allocator))
return false;
1590 if ( !JsonHelper::Member_FromJson(json, flags,
"he_drive", data.he_drive, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
1591 if ( !JsonHelper::Member_FromJson(json, flags,
"he_mix_on", data.he_mix_on, allocator))
return false;
1592 if ( !JsonHelper::Member_FromJson(json, flags,
"he_mix", data.he_mix, allocator, JsonConstraint<S4Float>(-6,6)))
return false;
1593 if ((flags & JSON_CVT_WITHDEV) &&
1594 !JsonHelper::Member_FromJson(json, flags,
"he_threshold", data.he_threshold, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
1598 static bool ToJson(JSON_Value &json,
const json_bandlimiter& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1600 if (json.IsNull ()) {
1602 flags &= ~JSON_CVT_ONLYREQ;
1603 }
else if (!json.IsObject()) {
1604 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1607 if ((flags & JSON_CVT_WITHDEV) &&
1608 !JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
1609 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"drive_on", data.drive_on))
return false;
1610 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"drive", data.drive))
return false;
1611 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"threshold_on", data.threshold_on))
return false;
1612 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"threshold", data.threshold))
return false;
1613 if ((flags & JSON_CVT_WITHDEV) &&
1614 !JsonHelper::Member_ToJson(json, flags, allocator,
"base_thres", data.base_thres))
return false;
1615 if ((flags & JSON_CVT_WITHDEV) &&
1616 !JsonHelper::Member_ToJson(json, flags, allocator,
"postgain", data.postgain))
return false;
1617 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"mix_on", data.mix_on))
return false;
1618 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"mix", data.mix))
return false;
1619 if ((flags & JSON_CVT_WITHDEV) &&
1620 !JsonHelper::Member_ToJson(json, flags, allocator,
"preview", data.preview))
return false;
1621 if ((flags & JSON_CVT_WITHDEV) &&
1622 !JsonHelper::Member_ToJson(json, flags, allocator,
"asymmetric", data.asymmetric))
return false;
1623 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"he_on", data.he_on))
return false;
1624 if ((flags & JSON_CVT_WITHDEV) &&
1625 !JsonHelper::Member_ToJson(json, flags, allocator,
"he_freq", data.he_freq))
return false;
1626 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"he_drive_on", data.he_drive_on))
return false;
1627 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"he_drive", data.he_drive))
return false;
1628 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"he_mix_on", data.he_mix_on))
return false;
1629 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"he_mix", data.he_mix))
return false;
1630 if ((flags & JSON_CVT_WITHDEV) &&
1631 !JsonHelper::Member_ToJson(json, flags, allocator,
"he_threshold", data.he_threshold))
return false;
1632 if (json.MemberCount()==0) json.SetNull();
1638 if (json.IsNull ()) {
1640 flags &= ~JSON_CVT_ONLYREQ;
1641 }
else if (!json.IsObject()) {
1642 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1645 if ((flags & JSON_CVT_WITHDEV) &&
1646 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
1647 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive_on", data.drive_on, ref.drive_on))
return false;
1648 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive", data.drive, ref.drive))
return false;
1649 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"threshold_on", data.threshold_on, ref.threshold_on))
return false;
1650 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"threshold", data.threshold, ref.threshold))
return false;
1651 if ((flags & JSON_CVT_WITHDEV) &&
1652 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"base_thres", data.base_thres, ref.base_thres))
return false;
1653 if ((flags & JSON_CVT_WITHDEV) &&
1654 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"postgain", data.postgain, ref.postgain))
return false;
1655 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"mix_on", data.mix_on, ref.mix_on))
return false;
1656 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"mix", data.mix, ref.mix))
return false;
1657 if ((flags & JSON_CVT_WITHDEV) &&
1658 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"preview", data.preview, ref.preview))
return false;
1659 if ((flags & JSON_CVT_WITHDEV) &&
1660 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"asymmetric", data.asymmetric, ref.asymmetric))
return false;
1661 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_on", data.he_on, ref.he_on))
return false;
1662 if ((flags & JSON_CVT_WITHDEV) &&
1663 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_freq", data.he_freq, ref.he_freq))
return false;
1664 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_drive_on", data.he_drive_on, ref.he_drive_on))
return false;
1665 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_drive", data.he_drive, ref.he_drive))
return false;
1666 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_mix_on", data.he_mix_on, ref.he_mix_on))
return false;
1667 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_mix", data.he_mix, ref.he_mix))
return false;
1668 if ((flags & JSON_CVT_WITHDEV) &&
1669 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"he_threshold", data.he_threshold, ref.he_threshold))
return false;
1670 if (json.MemberCount()==0) json.SetNull();
1675 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
1676 JsonHelper::Member_ForceChange(allocator,
"drive_on", data.drive_on, ref.drive_on);
1677 JsonHelper::Member_ForceChange(allocator,
"drive", data.drive, ref.drive);
1678 JsonHelper::Member_ForceChange(allocator,
"threshold_on", data.threshold_on, ref.threshold_on);
1679 JsonHelper::Member_ForceChange(allocator,
"threshold", data.threshold, ref.threshold);
1680 JsonHelper::Member_ForceChange(allocator,
"base_thres", data.base_thres, ref.base_thres);
1681 JsonHelper::Member_ForceChange(allocator,
"postgain", data.postgain, ref.postgain);
1682 JsonHelper::Member_ForceChange(allocator,
"mix_on", data.mix_on, ref.mix_on);
1683 JsonHelper::Member_ForceChange(allocator,
"mix", data.mix, ref.mix);
1684 JsonHelper::Member_ForceChange(allocator,
"preview", data.preview, ref.preview);
1685 JsonHelper::Member_ForceChange(allocator,
"asymmetric", data.asymmetric, ref.asymmetric);
1686 JsonHelper::Member_ForceChange(allocator,
"he_on", data.he_on, ref.he_on);
1687 JsonHelper::Member_ForceChange(allocator,
"he_freq", data.he_freq, ref.he_freq);
1688 JsonHelper::Member_ForceChange(allocator,
"he_drive_on", data.he_drive_on, ref.he_drive_on);
1689 JsonHelper::Member_ForceChange(allocator,
"he_drive", data.he_drive, ref.he_drive);
1690 JsonHelper::Member_ForceChange(allocator,
"he_mix_on", data.he_mix_on, ref.he_mix_on);
1691 JsonHelper::Member_ForceChange(allocator,
"he_mix", data.he_mix, ref.he_mix);
1692 JsonHelper::Member_ForceChange(allocator,
"he_threshold", data.he_threshold, ref.he_threshold);
1702 static bool ToJson(JSON_Value &json,
const jsonvu_bandlimiter& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1704 if (json.IsNull ()) {
1706 flags &= ~JSON_CVT_ONLYREQ;
1707 }
else if (!json.IsObject()) {
1708 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1711 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gain", data.gain))
return false;
1712 if ((flags & JSON_CVT_WITHDEV) &&
1713 !JsonHelper::Member_ToJson(json, flags, allocator,
"out", data.out))
return false;
1714 if (json.MemberCount()==0) json.SetNull();
1720 if (json.IsNull ()) {
1722 flags &= ~JSON_CVT_ONLYREQ;
1723 }
else if (!json.IsObject()) {
1724 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1727 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gain", data.gain, ref.gain))
return false;
1728 if ((flags & JSON_CVT_WITHDEV) &&
1729 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"out", data.out, ref.out))
return false;
1730 if (json.MemberCount()==0) json.SetNull();
1735 JsonHelper::Member_ForceChange(allocator,
"gain", data.gain, ref.gain);
1736 JsonHelper::Member_ForceChange(allocator,
"out", data.out, ref.out);
1745 static bool FromJson(
const JSON_Value& json,
json_limiter& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_limiter> &constraints = JsonConstraint<json_limiter>()) {
1747 if (json.IsNull()) {
return true; }
1748 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
1749 if ((flags & JSON_CVT_WITHDEV) &&
1750 !JsonHelper::Member_FromJson(json, flags,
"mode", data.mode, allocator))
return false;
1751 if ((flags & JSON_CVT_WITHDEV) &&
1752 !JsonHelper::Member_FromJson(json, flags,
"drive", data.drive, allocator, JsonConstraint<S4Float>(-20,8)))
return false;
1753 if ((flags & JSON_CVT_WITHDEV) &&
1754 !JsonHelper::Member_FromJson(json, flags,
"base_drive", data.base_drive, allocator, JsonConstraint<S4Float>(-20,20)))
return false;
1755 if ( !JsonHelper::Member_FromJson(json, flags,
"lk_drive_on", data.lk_drive_on, allocator))
return false;
1756 if ( !JsonHelper::Member_FromJson(json, flags,
"lk_drive", data.lk_drive, allocator, JsonConstraint<S4Float>(-20,8)))
return false;
1757 if ((flags & JSON_CVT_WITHDEV) &&
1758 !JsonHelper::Member_FromJson(json, flags,
"lk_base_drive", data.lk_base_drive, allocator, JsonConstraint<S4Float>(-20,20)))
return false;
1759 if ((flags & JSON_CVT_WITHDEV) &&
1760 !JsonHelper::Member_FromJson(json, flags,
"lk_len", data.lk_len, allocator, JsonConstraint<S4Float>(0.5,30)))
return false;
1761 if ((flags & JSON_CVT_WITHDEV) &&
1762 !JsonHelper::Member_FromJson(json, flags,
"lk_attack", data.lk_attack, allocator, JsonConstraint<S4Float>(1,32000)))
return false;
1763 if ( !JsonHelper::Member_FromJson(json, flags,
"lk_release", data.lk_release, allocator))
return false;
1764 if ( !JsonHelper::Member_FromJson(json, flags,
"lk_postgain_on", data.lk_postgain_on, allocator))
return false;
1765 if ( !JsonHelper::Member_FromJson(json, flags,
"lk_postgain", data.lk_postgain, allocator, JsonConstraint<S4Float>(0,+4)))
return false;
1766 if ((flags & JSON_CVT_WITHDEV) &&
1767 !JsonHelper::Member_FromJson(json, flags,
"lk_factor", data.lk_factor, allocator, JsonConstraint<S4Float>(1.0,8.0)))
return false;
1768 if ((flags & JSON_CVT_WITHDEV) &&
1769 !JsonHelper::Member_FromJson(json, flags,
"lk_rel_tab", data.lk_rel_tab, allocator, JsonConstraint<S4Float>(1,32000)))
return false;
1770 if ((flags & JSON_CVT_WITHDEV) &&
1771 !JsonHelper::Member_FromJson(json, flags,
"lk_mode", data.lk_mode, allocator))
return false;
1775 static bool ToJson(JSON_Value &json,
const json_limiter& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1777 if (json.IsNull ()) {
1779 flags &= ~JSON_CVT_ONLYREQ;
1780 }
else if (!json.IsObject()) {
1781 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1784 if ((flags & JSON_CVT_WITHDEV) &&
1785 !JsonHelper::Member_ToJson(json, flags, allocator,
"mode", data.mode))
return false;
1786 if ((flags & JSON_CVT_WITHDEV) &&
1787 !JsonHelper::Member_ToJson(json, flags, allocator,
"drive", data.drive))
return false;
1788 if ((flags & JSON_CVT_WITHDEV) &&
1789 !JsonHelper::Member_ToJson(json, flags, allocator,
"base_drive", data.base_drive))
return false;
1790 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lk_drive_on", data.lk_drive_on))
return false;
1791 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lk_drive", data.lk_drive))
return false;
1792 if ((flags & JSON_CVT_WITHDEV) &&
1793 !JsonHelper::Member_ToJson(json, flags, allocator,
"lk_base_drive", data.lk_base_drive))
return false;
1794 if ((flags & JSON_CVT_WITHDEV) &&
1795 !JsonHelper::Member_ToJson(json, flags, allocator,
"lk_len", data.lk_len))
return false;
1796 if ((flags & JSON_CVT_WITHDEV) &&
1797 !JsonHelper::Member_ToJson(json, flags, allocator,
"lk_attack", data.lk_attack))
return false;
1798 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lk_release", data.lk_release))
return false;
1799 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lk_postgain_on", data.lk_postgain_on))
return false;
1800 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"lk_postgain", data.lk_postgain))
return false;
1801 if ((flags & JSON_CVT_WITHDEV) &&
1802 !JsonHelper::Member_ToJson(json, flags, allocator,
"lk_factor", data.lk_factor))
return false;
1803 if ((flags & JSON_CVT_WITHDEV) &&
1804 !JsonHelper::Member_ToJson(json, flags, allocator,
"lk_rel_tab", data.lk_rel_tab))
return false;
1805 if ((flags & JSON_CVT_WITHDEV) &&
1806 !JsonHelper::Member_ToJson(json, flags, allocator,
"lk_mode", data.lk_mode))
return false;
1807 if (json.MemberCount()==0) json.SetNull();
1811 static bool DiffToJson(JSON_Value &json,
const json_limiter& data [[maybe_unused]],
json_limiter& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1813 if (json.IsNull ()) {
1815 flags &= ~JSON_CVT_ONLYREQ;
1816 }
else if (!json.IsObject()) {
1817 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1820 if ((flags & JSON_CVT_WITHDEV) &&
1821 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"mode", data.mode, ref.mode))
return false;
1822 if ((flags & JSON_CVT_WITHDEV) &&
1823 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"drive", data.drive, ref.drive))
return false;
1824 if ((flags & JSON_CVT_WITHDEV) &&
1825 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"base_drive", data.base_drive, ref.base_drive))
return false;
1826 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_drive_on", data.lk_drive_on, ref.lk_drive_on))
return false;
1827 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_drive", data.lk_drive, ref.lk_drive))
return false;
1828 if ((flags & JSON_CVT_WITHDEV) &&
1829 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_base_drive", data.lk_base_drive, ref.lk_base_drive))
return false;
1830 if ((flags & JSON_CVT_WITHDEV) &&
1831 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_len", data.lk_len, ref.lk_len))
return false;
1832 if ((flags & JSON_CVT_WITHDEV) &&
1833 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_attack", data.lk_attack, ref.lk_attack))
return false;
1834 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_release", data.lk_release, ref.lk_release))
return false;
1835 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_postgain_on", data.lk_postgain_on, ref.lk_postgain_on))
return false;
1836 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_postgain", data.lk_postgain, ref.lk_postgain))
return false;
1837 if ((flags & JSON_CVT_WITHDEV) &&
1838 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_factor", data.lk_factor, ref.lk_factor))
return false;
1839 if ((flags & JSON_CVT_WITHDEV) &&
1840 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_rel_tab", data.lk_rel_tab, ref.lk_rel_tab))
return false;
1841 if ((flags & JSON_CVT_WITHDEV) &&
1842 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lk_mode", data.lk_mode, ref.lk_mode))
return false;
1843 if (json.MemberCount()==0) json.SetNull();
1848 JsonHelper::Member_ForceChange(allocator,
"mode", data.mode, ref.mode);
1849 JsonHelper::Member_ForceChange(allocator,
"drive", data.drive, ref.drive);
1850 JsonHelper::Member_ForceChange(allocator,
"base_drive", data.base_drive, ref.base_drive);
1851 JsonHelper::Member_ForceChange(allocator,
"lk_drive_on", data.lk_drive_on, ref.lk_drive_on);
1852 JsonHelper::Member_ForceChange(allocator,
"lk_drive", data.lk_drive, ref.lk_drive);
1853 JsonHelper::Member_ForceChange(allocator,
"lk_base_drive", data.lk_base_drive, ref.lk_base_drive);
1854 JsonHelper::Member_ForceChange(allocator,
"lk_len", data.lk_len, ref.lk_len);
1855 JsonHelper::Member_ForceChange(allocator,
"lk_attack", data.lk_attack, ref.lk_attack);
1856 JsonHelper::Member_ForceChange(allocator,
"lk_release", data.lk_release, ref.lk_release);
1857 JsonHelper::Member_ForceChange(allocator,
"lk_postgain_on", data.lk_postgain_on, ref.lk_postgain_on);
1858 JsonHelper::Member_ForceChange(allocator,
"lk_postgain", data.lk_postgain, ref.lk_postgain);
1859 JsonHelper::Member_ForceChange(allocator,
"lk_factor", data.lk_factor, ref.lk_factor);
1860 JsonHelper::Member_ForceChange(allocator,
"lk_rel_tab", data.lk_rel_tab, ref.lk_rel_tab);
1861 JsonHelper::Member_ForceChange(allocator,
"lk_mode", data.lk_mode, ref.lk_mode);
1871 static bool ToJson(JSON_Value &json,
const jsonvu_limiter& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1873 if (json.IsNull ()) {
1875 flags &= ~JSON_CVT_ONLYREQ;
1876 }
else if (!json.IsObject()) {
1877 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1880 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gain", data.gain))
return false;
1881 if ((flags & JSON_CVT_WITHDEV) &&
1882 !JsonHelper::Member_ToJson(json, flags, allocator,
"lkatt", data.lkatt))
return false;
1883 if ((flags & JSON_CVT_WITHDEV) &&
1884 !JsonHelper::Member_ToJson(json, flags, allocator,
"over", data.over))
return false;
1885 if (json.MemberCount()==0) json.SetNull();
1891 if (json.IsNull ()) {
1893 flags &= ~JSON_CVT_ONLYREQ;
1894 }
else if (!json.IsObject()) {
1895 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1898 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gain", data.gain, ref.gain))
return false;
1899 if ((flags & JSON_CVT_WITHDEV) &&
1900 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"lkatt", data.lkatt, ref.lkatt))
return false;
1901 if ((flags & JSON_CVT_WITHDEV) &&
1902 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"over", data.over, ref.over))
return false;
1903 if (json.MemberCount()==0) json.SetNull();
1908 JsonHelper::Member_ForceChange(allocator,
"gain", data.gain, ref.gain);
1909 JsonHelper::Member_ForceChange(allocator,
"lkatt", data.lkatt, ref.lkatt);
1910 JsonHelper::Member_ForceChange(allocator,
"over", data.over, ref.over);
1919 static bool FromJson(
const JSON_Value& json,
json_output& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_output> &constraints = JsonConstraint<json_output>()) {
1921 if (json.IsNull()) {
return true; }
1922 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
1926 static bool ToJson(JSON_Value &json,
const json_output& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1928 if (json.IsNull ()) {
1930 flags &= ~JSON_CVT_ONLYREQ;
1931 }
else if (!json.IsObject()) {
1932 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1935 if (json.MemberCount()==0) json.SetNull();
1939 static bool DiffToJson(JSON_Value &json,
const json_output& data [[maybe_unused]],
json_output& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1941 if (json.IsNull ()) {
1943 flags &= ~JSON_CVT_ONLYREQ;
1944 }
else if (!json.IsObject()) {
1945 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1948 if (json.MemberCount()==0) json.SetNull();
1962 static bool ToJson(JSON_Value &json,
const jsonvu_output& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
1964 if (json.IsNull ()) {
1966 flags &= ~JSON_CVT_ONLYREQ;
1967 }
else if (!json.IsObject()) {
1968 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1971 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vu", data.vu))
return false;
1972 if (json.MemberCount()==0) json.SetNull();
1978 if (json.IsNull ()) {
1980 flags &= ~JSON_CVT_ONLYREQ;
1981 }
else if (!json.IsObject()) {
1982 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
1985 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vu", data.vu, ref.vu))
return false;
1986 if (json.MemberCount()==0) json.SetNull();
1991 JsonHelper::Member_ForceChange(allocator,
"vu", data.vu, ref.vu);
2000 static bool FromJson(
const JSON_Value& json,
json_r128& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_r128> &constraints = JsonConstraint<json_r128>()) {
2002 if (json.IsNull()) {
return true; }
2003 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
2004 if ( !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
2005 if ( !JsonHelper::Member_FromJson(json, flags,
"target", data.target, allocator, JsonConstraint<S4Float>(-36,0)))
return false;
2006 if ((flags & JSON_CVT_WITHDEV) &&
2007 !JsonHelper::Member_FromJson(json, flags,
"attack", data.attack, allocator, JsonConstraint<S4Float>(0.01,10)))
return false;
2008 if ((flags & JSON_CVT_WITHDEV) &&
2009 !JsonHelper::Member_FromJson(json, flags,
"release", data.release, allocator, JsonConstraint<S4Float>(0.01,10)))
return false;
2013 static bool ToJson(JSON_Value &json,
const json_r128& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2015 if (json.IsNull ()) {
2017 flags &= ~JSON_CVT_ONLYREQ;
2018 }
else if (!json.IsObject()) {
2019 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2022 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
2023 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"target", data.target))
return false;
2024 if ((flags & JSON_CVT_WITHDEV) &&
2025 !JsonHelper::Member_ToJson(json, flags, allocator,
"attack", data.attack))
return false;
2026 if ((flags & JSON_CVT_WITHDEV) &&
2027 !JsonHelper::Member_ToJson(json, flags, allocator,
"release", data.release))
return false;
2028 if (json.MemberCount()==0) json.SetNull();
2032 static bool DiffToJson(JSON_Value &json,
const json_r128& data [[maybe_unused]],
json_r128& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2034 if (json.IsNull ()) {
2036 flags &= ~JSON_CVT_ONLYREQ;
2037 }
else if (!json.IsObject()) {
2038 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2041 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
2042 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"target", data.target, ref.target))
return false;
2043 if ((flags & JSON_CVT_WITHDEV) &&
2044 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"attack", data.attack, ref.attack))
return false;
2045 if ((flags & JSON_CVT_WITHDEV) &&
2046 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"release", data.release, ref.release))
return false;
2047 if (json.MemberCount()==0) json.SetNull();
2052 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
2053 JsonHelper::Member_ForceChange(allocator,
"target", data.target, ref.target);
2054 JsonHelper::Member_ForceChange(allocator,
"attack", data.attack, ref.attack);
2055 JsonHelper::Member_ForceChange(allocator,
"release", data.release, ref.release);
2065 static bool ToJson(JSON_Value &json,
const jsonvu_r128& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2067 if (json.IsNull ()) {
2069 flags &= ~JSON_CVT_ONLYREQ;
2070 }
else if (!json.IsObject()) {
2071 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2074 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vu_on", data.vu_on))
return false;
2075 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vu_target", data.vu_target))
return false;
2076 if ((flags & JSON_CVT_WITHDEV) &&
2077 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_moment", data.bs_moment))
return false;
2078 if ((flags & JSON_CVT_WITHDEV) &&
2079 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_short", data.bs_short))
return false;
2080 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bs_long", data.bs_long))
return false;
2081 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bs_user", data.bs_user))
return false;
2082 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gain", data.gain))
return false;
2083 if ((flags & JSON_CVT_WITHDEV) &&
2084 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_psr", data.bs_psr))
return false;
2085 if ((flags & JSON_CVT_WITHDEV) &&
2086 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_plr", data.bs_plr))
return false;
2087 if ((flags & JSON_CVT_WITHDEV) &&
2088 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_moment_pk", data.bs_moment_pk))
return false;
2089 if ((flags & JSON_CVT_WITHDEV) &&
2090 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_short_pk", data.bs_short_pk))
return false;
2091 if ((flags & JSON_CVT_WITHDEV) &&
2092 !JsonHelper::Member_ToJson(json, flags, allocator,
"bs_long_pk", data.bs_long_pk))
return false;
2093 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bs_user_pk", data.bs_user_pk))
return false;
2094 if (json.MemberCount()==0) json.SetNull();
2098 static bool DiffToJson(JSON_Value &json,
const jsonvu_r128& data [[maybe_unused]],
jsonvu_r128& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2100 if (json.IsNull ()) {
2102 flags &= ~JSON_CVT_ONLYREQ;
2103 }
else if (!json.IsObject()) {
2104 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2107 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vu_on", data.vu_on, ref.vu_on))
return false;
2108 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vu_target", data.vu_target, ref.vu_target))
return false;
2109 if ((flags & JSON_CVT_WITHDEV) &&
2110 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_moment", data.bs_moment, ref.bs_moment))
return false;
2111 if ((flags & JSON_CVT_WITHDEV) &&
2112 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_short", data.bs_short, ref.bs_short))
return false;
2113 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_long", data.bs_long, ref.bs_long))
return false;
2114 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_user", data.bs_user, ref.bs_user))
return false;
2115 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gain", data.gain, ref.gain))
return false;
2116 if ((flags & JSON_CVT_WITHDEV) &&
2117 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_psr", data.bs_psr, ref.bs_psr))
return false;
2118 if ((flags & JSON_CVT_WITHDEV) &&
2119 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_plr", data.bs_plr, ref.bs_plr))
return false;
2120 if ((flags & JSON_CVT_WITHDEV) &&
2121 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_moment_pk", data.bs_moment_pk, ref.bs_moment_pk))
return false;
2122 if ((flags & JSON_CVT_WITHDEV) &&
2123 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_short_pk", data.bs_short_pk, ref.bs_short_pk))
return false;
2124 if ((flags & JSON_CVT_WITHDEV) &&
2125 !JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_long_pk", data.bs_long_pk, ref.bs_long_pk))
return false;
2126 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bs_user_pk", data.bs_user_pk, ref.bs_user_pk))
return false;
2127 if (json.MemberCount()==0) json.SetNull();
2132 JsonHelper::Member_ForceChange(allocator,
"vu_on", data.vu_on, ref.vu_on);
2133 JsonHelper::Member_ForceChange(allocator,
"vu_target", data.vu_target, ref.vu_target);
2134 JsonHelper::Member_ForceChange(allocator,
"bs_moment", data.bs_moment, ref.bs_moment);
2135 JsonHelper::Member_ForceChange(allocator,
"bs_short", data.bs_short, ref.bs_short);
2136 JsonHelper::Member_ForceChange(allocator,
"bs_long", data.bs_long, ref.bs_long);
2137 JsonHelper::Member_ForceChange(allocator,
"bs_user", data.bs_user, ref.bs_user);
2138 JsonHelper::Member_ForceChange(allocator,
"gain", data.gain, ref.gain);
2139 JsonHelper::Member_ForceChange(allocator,
"bs_psr", data.bs_psr, ref.bs_psr);
2140 JsonHelper::Member_ForceChange(allocator,
"bs_plr", data.bs_plr, ref.bs_plr);
2141 JsonHelper::Member_ForceChange(allocator,
"bs_moment_pk", data.bs_moment_pk, ref.bs_moment_pk);
2142 JsonHelper::Member_ForceChange(allocator,
"bs_short_pk", data.bs_short_pk, ref.bs_short_pk);
2143 JsonHelper::Member_ForceChange(allocator,
"bs_long_pk", data.bs_long_pk, ref.bs_long_pk);
2144 JsonHelper::Member_ForceChange(allocator,
"bs_user_pk", data.bs_user_pk, ref.bs_user_pk);
2153 static bool FromJson(
const JSON_Value& json,
json_settings_gain& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_settings_gain> &constraints = JsonConstraint<json_settings_gain>()) {
2155 if (json.IsNull()) {
return true; }
2156 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
2157 if ( !JsonHelper::Member_FromJson(json, flags,
"in", data.in, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
2158 if ( !JsonHelper::Member_FromJson(json, flags,
"out", data.out, allocator, JsonConstraint<S4Float>(-30,30)))
return false;
2162 static bool ToJson(JSON_Value &json,
const json_settings_gain& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2164 if (json.IsNull ()) {
2166 flags &= ~JSON_CVT_ONLYREQ;
2167 }
else if (!json.IsObject()) {
2168 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2171 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"in", data.in))
return false;
2172 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"out", data.out))
return false;
2173 if (json.MemberCount()==0) json.SetNull();
2179 if (json.IsNull ()) {
2181 flags &= ~JSON_CVT_ONLYREQ;
2182 }
else if (!json.IsObject()) {
2183 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2186 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"in", data.in, ref.in))
return false;
2187 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"out", data.out, ref.out))
return false;
2188 if (json.MemberCount()==0) json.SetNull();
2193 JsonHelper::Member_ForceChange(allocator,
"in", data.in, ref.in);
2194 JsonHelper::Member_ForceChange(allocator,
"out", data.out, ref.out);
2204 static bool ToJson(JSON_Value &json,
const jsonvu_settings_gain& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2206 if (json.IsNull ()) {
2208 flags &= ~JSON_CVT_ONLYREQ;
2209 }
else if (!json.IsObject()) {
2210 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2213 if (json.MemberCount()==0) json.SetNull();
2219 if (json.IsNull ()) {
2221 flags &= ~JSON_CVT_ONLYREQ;
2222 }
else if (!json.IsObject()) {
2223 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2226 if (json.MemberCount()==0) json.SetNull();
2239 static bool FromJson(
const JSON_Value& json,
json_r128_settings& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_r128_settings> &constraints = JsonConstraint<json_r128_settings>()) {
2241 if (json.IsNull()) {
return true; }
2242 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
2243 if ( !JsonHelper::Member_FromJson(json, flags,
"longterm_time", data.longterm_time, allocator, JsonConstraint<S4Float>(4,120)))
return false;
2244 if ( !JsonHelper::Member_FromJson(json, flags,
"vutype", data.vutype, allocator))
return false;
2245 if ( !JsonHelper::Member_FromJson(json, flags,
"on", data.on, allocator))
return false;
2246 if ( !JsonHelper::Member_FromJson(json, flags,
"truepeak_protect", data.truepeak_protect, allocator))
return false;
2247 if ( !JsonHelper::Member_FromJson(json, flags,
"target", data.target, allocator, JsonConstraint<S4Float>(-36,0)))
return false;
2251 static bool ToJson(JSON_Value &json,
const json_r128_settings& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2253 if (json.IsNull ()) {
2255 flags &= ~JSON_CVT_ONLYREQ;
2256 }
else if (!json.IsObject()) {
2257 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2260 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"longterm_time", data.longterm_time))
return false;
2261 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"vutype", data.vutype))
return false;
2262 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"on", data.on))
return false;
2263 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"truepeak_protect", data.truepeak_protect))
return false;
2264 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"target", data.target))
return false;
2265 if (json.MemberCount()==0) json.SetNull();
2271 if (json.IsNull ()) {
2273 flags &= ~JSON_CVT_ONLYREQ;
2274 }
else if (!json.IsObject()) {
2275 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2278 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"longterm_time", data.longterm_time, ref.longterm_time))
return false;
2279 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"vutype", data.vutype, ref.vutype))
return false;
2280 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"on", data.on, ref.on))
return false;
2281 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"truepeak_protect", data.truepeak_protect, ref.truepeak_protect))
return false;
2282 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"target", data.target, ref.target))
return false;
2283 if (json.MemberCount()==0) json.SetNull();
2288 JsonHelper::Member_ForceChange(allocator,
"longterm_time", data.longterm_time, ref.longterm_time);
2289 JsonHelper::Member_ForceChange(allocator,
"vutype", data.vutype, ref.vutype);
2290 JsonHelper::Member_ForceChange(allocator,
"on", data.on, ref.on);
2291 JsonHelper::Member_ForceChange(allocator,
"truepeak_protect", data.truepeak_protect, ref.truepeak_protect);
2292 JsonHelper::Member_ForceChange(allocator,
"target", data.target, ref.target);
2302 static bool ToJson(JSON_Value &json,
const jsonvu_r128_settings& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2304 if (json.IsNull ()) {
2306 flags &= ~JSON_CVT_ONLYREQ;
2307 }
else if (!json.IsObject()) {
2308 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2311 if (json.MemberCount()==0) json.SetNull();
2317 if (json.IsNull ()) {
2319 flags &= ~JSON_CVT_ONLYREQ;
2320 }
else if (!json.IsObject()) {
2321 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2324 if (json.MemberCount()==0) json.SetNull();
2337 static bool FromJson(
const JSON_Value& json,
json_settings_general& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_settings_general> &constraints = JsonConstraint<json_settings_general>()) {
2339 if (json.IsNull()) {
return true; }
2340 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
2341 if ( !JsonHelper::Member_FromJson(json, flags,
"operate", data.operate, allocator))
return false;
2342 if ( !JsonHelper::Member_FromJson(json, flags,
"history_unit", data.history_unit, allocator))
return false;
2346 static bool ToJson(JSON_Value &json,
const json_settings_general& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2348 if (json.IsNull ()) {
2350 flags &= ~JSON_CVT_ONLYREQ;
2351 }
else if (!json.IsObject()) {
2352 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2355 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"operate", data.operate))
return false;
2356 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"history_unit", data.history_unit))
return false;
2357 if (json.MemberCount()==0) json.SetNull();
2363 if (json.IsNull ()) {
2365 flags &= ~JSON_CVT_ONLYREQ;
2366 }
else if (!json.IsObject()) {
2367 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2370 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"operate", data.operate, ref.operate))
return false;
2371 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"history_unit", data.history_unit, ref.history_unit))
return false;
2372 if (json.MemberCount()==0) json.SetNull();
2377 JsonHelper::Member_ForceChange(allocator,
"operate", data.operate, ref.operate);
2378 JsonHelper::Member_ForceChange(allocator,
"history_unit", data.history_unit, ref.history_unit);
2388 static bool ToJson(JSON_Value &json,
const jsonvu_settings_general& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2390 if (json.IsNull ()) {
2392 flags &= ~JSON_CVT_ONLYREQ;
2393 }
else if (!json.IsObject()) {
2394 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2397 if (json.MemberCount()==0) json.SetNull();
2403 if (json.IsNull ()) {
2405 flags &= ~JSON_CVT_ONLYREQ;
2406 }
else if (!json.IsObject()) {
2407 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2410 if (json.MemberCount()==0) json.SetNull();
2425 static bool FromJson(
const JSON_Value& json,
json_settings& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_settings> &constraints = JsonConstraint<json_settings>()) {
2427 if (json.IsNull()) {
return true; }
2428 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
2429 if ( !JsonHelper::Member_FromJson(json, flags,
"general", data.general, allocator))
return false;
2430 if ( !JsonHelper::Member_FromJson(json, flags,
"gain", data.gain, allocator))
return false;
2431 if ( !JsonHelper::Member_FromJson(json, flags,
"r128", data.r128, allocator))
return false;
2435 static bool ToJson(JSON_Value &json,
const json_settings& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2437 if (json.IsNull ()) {
2439 flags &= ~JSON_CVT_ONLYREQ;
2440 }
else if (!json.IsObject()) {
2441 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2444 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"general", data.general))
return false;
2445 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gain", data.gain))
return false;
2446 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"r128", data.r128))
return false;
2447 if (json.MemberCount()==0) json.SetNull();
2453 if (json.IsNull ()) {
2455 flags &= ~JSON_CVT_ONLYREQ;
2456 }
else if (!json.IsObject()) {
2457 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2460 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"general", data.general, ref.general))
return false;
2461 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gain", data.gain, ref.gain))
return false;
2462 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"r128", data.r128, ref.r128))
return false;
2463 if (json.MemberCount()==0) json.SetNull();
2468 JsonHelper::Member_ForceChange(allocator,
"general", data.general, ref.general);
2469 JsonHelper::Member_ForceChange(allocator,
"gain", data.gain, ref.gain);
2470 JsonHelper::Member_ForceChange(allocator,
"r128", data.r128, ref.r128);
2482 static bool ToJson(JSON_Value &json,
const jsonvu_settings& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2484 if (json.IsNull ()) {
2486 flags &= ~JSON_CVT_ONLYREQ;
2487 }
else if (!json.IsObject()) {
2488 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2491 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"general", data.general))
return false;
2492 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"gain", data.gain))
return false;
2493 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"r128", data.r128))
return false;
2494 if (json.MemberCount()==0) json.SetNull();
2500 if (json.IsNull ()) {
2502 flags &= ~JSON_CVT_ONLYREQ;
2503 }
else if (!json.IsObject()) {
2504 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2507 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"general", data.general, ref.general))
return false;
2508 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"gain", data.gain, ref.gain))
return false;
2509 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"r128", data.r128, ref.r128))
return false;
2510 if (json.MemberCount()==0) json.SetNull();
2515 JsonHelper::Member_ForceChange(allocator,
"general", data.general, ref.general);
2516 JsonHelper::Member_ForceChange(allocator,
"gain", data.gain, ref.gain);
2517 JsonHelper::Member_ForceChange(allocator,
"r128", data.r128, ref.r128);
2527 static bool FromJson(
const JSON_Value& json,
json_preset& data [[maybe_unused]],
int flags [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]],
const JsonConstraint<json_preset> &constraints = JsonConstraint<json_preset>()) {
2529 if (json.IsNull()) {
return true; }
2530 if (!json.IsObject()) { PLOG_WARNING <<
" JSON is not an object but "<<GetJSTypeDetails(json);
return false; }
2531 if ( !JsonHelper::Member_FromJson(json, flags,
"setup", data.setup, allocator))
return false;
2532 if ( !JsonHelper::Member_FromJson(json, flags,
"in", data.in, allocator))
return false;
2533 if ( !JsonHelper::Member_FromJson(json, flags,
"agc", data.agc, allocator))
return false;
2534 if ( !JsonHelper::Member_FromJson(json, flags,
"tonefx", data.tonefx, allocator))
return false;
2535 if ( !JsonHelper::Member_FromJson(json, flags,
"stereofx", data.stereofx, allocator))
return false;
2536 if ( !JsonHelper::Member_FromJson(json, flags,
"bandprocess", data.bandprocess, allocator))
return false;
2537 if ( !JsonHelper::Member_FromJson(json, flags,
"bandlimiter", data.bandlimiter, allocator))
return false;
2538 if ( !JsonHelper::Member_FromJson(json, flags,
"limiter", data.limiter, allocator))
return false;
2539 if ( !JsonHelper::Member_FromJson(json, flags,
"out", data.out, allocator))
return false;
2540 if ( !JsonHelper::Member_FromJson(json, flags,
"r128", data.r128, allocator))
return false;
2544 static bool ToJson(JSON_Value &json,
const json_preset& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2546 if (json.IsNull ()) {
2548 flags &= ~JSON_CVT_ONLYREQ;
2549 }
else if (!json.IsObject()) {
2550 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2553 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"setup", data.setup))
return false;
2554 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"in", data.in))
return false;
2555 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"agc", data.agc))
return false;
2556 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"tonefx", data.tonefx))
return false;
2557 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"stereofx", data.stereofx))
return false;
2558 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bandprocess", data.bandprocess))
return false;
2559 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bandlimiter", data.bandlimiter))
return false;
2560 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"limiter", data.limiter))
return false;
2561 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"out", data.out))
return false;
2562 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"r128", data.r128))
return false;
2563 if (json.MemberCount()==0) json.SetNull();
2567 static bool DiffToJson(JSON_Value &json,
const json_preset& data [[maybe_unused]],
json_preset& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2569 if (json.IsNull ()) {
2571 flags &= ~JSON_CVT_ONLYREQ;
2572 }
else if (!json.IsObject()) {
2573 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2576 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"setup", data.setup, ref.setup))
return false;
2577 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"in", data.in, ref.in))
return false;
2578 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"agc", data.agc, ref.agc))
return false;
2579 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"tonefx", data.tonefx, ref.tonefx))
return false;
2580 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"stereofx", data.stereofx, ref.stereofx))
return false;
2581 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bandprocess", data.bandprocess, ref.bandprocess))
return false;
2582 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bandlimiter", data.bandlimiter, ref.bandlimiter))
return false;
2583 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"limiter", data.limiter, ref.limiter))
return false;
2584 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"out", data.out, ref.out))
return false;
2585 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"r128", data.r128, ref.r128))
return false;
2586 if (json.MemberCount()==0) json.SetNull();
2591 JsonHelper::Member_ForceChange(allocator,
"setup", data.setup, ref.setup);
2592 JsonHelper::Member_ForceChange(allocator,
"in", data.in, ref.in);
2593 JsonHelper::Member_ForceChange(allocator,
"agc", data.agc, ref.agc);
2594 JsonHelper::Member_ForceChange(allocator,
"tonefx", data.tonefx, ref.tonefx);
2595 JsonHelper::Member_ForceChange(allocator,
"stereofx", data.stereofx, ref.stereofx);
2596 JsonHelper::Member_ForceChange(allocator,
"bandprocess", data.bandprocess, ref.bandprocess);
2597 JsonHelper::Member_ForceChange(allocator,
"bandlimiter", data.bandlimiter, ref.bandlimiter);
2598 JsonHelper::Member_ForceChange(allocator,
"limiter", data.limiter, ref.limiter);
2599 JsonHelper::Member_ForceChange(allocator,
"out", data.out, ref.out);
2600 JsonHelper::Member_ForceChange(allocator,
"r128", data.r128, ref.r128);
2612 static bool ToJson(JSON_Value &json,
const json_vu& data [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2613 if (
sizeof(
json_vu)==0)
return true;
2614 if (json.IsNull ()) {
2616 flags &= ~JSON_CVT_ONLYREQ;
2617 }
else if (!json.IsObject()) {
2618 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2621 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"setup", data.setup))
return false;
2622 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"in", data.in))
return false;
2623 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"agc", data.agc))
return false;
2624 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"tonefx", data.tonefx))
return false;
2625 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"stereofx", data.stereofx))
return false;
2626 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bandprocess", data.bandprocess))
return false;
2627 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"bandlimiter", data.bandlimiter))
return false;
2628 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"limiter", data.limiter))
return false;
2629 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"out", data.out))
return false;
2630 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"r128", data.r128))
return false;
2632 if (!JsonHelper::Member_ToJson(json, flags, allocator,
"settings", data.settings))
return false;
2633 if (json.MemberCount()==0) json.SetNull();
2637 static bool DiffToJson(JSON_Value &json,
const json_vu& data [[maybe_unused]],
json_vu& ref [[maybe_unused]],
int flags, JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2638 if (
sizeof(
json_vu)==0)
return true;
2639 if (json.IsNull ()) {
2641 flags &= ~JSON_CVT_ONLYREQ;
2642 }
else if (!json.IsObject()) {
2643 PLOG_WARNING <<
"Invalid JSON syntax: waiting for an object but has "<<GetJSTypeDetails(json);
2646 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"setup", data.setup, ref.setup))
return false;
2647 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"in", data.in, ref.in))
return false;
2648 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"agc", data.agc, ref.agc))
return false;
2649 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"tonefx", data.tonefx, ref.tonefx))
return false;
2650 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"stereofx", data.stereofx, ref.stereofx))
return false;
2651 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bandprocess", data.bandprocess, ref.bandprocess))
return false;
2652 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"bandlimiter", data.bandlimiter, ref.bandlimiter))
return false;
2653 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"limiter", data.limiter, ref.limiter))
return false;
2654 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"out", data.out, ref.out))
return false;
2655 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"r128", data.r128, ref.r128))
return false;
2657 if (!JsonHelper::Member_DiffToJson(json, flags, allocator,
"settings", data.settings, ref.settings))
return false;
2658 if (json.MemberCount()==0) json.SetNull();
2662 static void ForceChange(
const json_vu& data [[maybe_unused]],
json_vu& ref [[maybe_unused]], JSON_Document::AllocatorType& allocator [[maybe_unused]]) {
2663 JsonHelper::Member_ForceChange(allocator,
"setup", data.setup, ref.setup);
2664 JsonHelper::Member_ForceChange(allocator,
"in", data.in, ref.in);
2665 JsonHelper::Member_ForceChange(allocator,
"agc", data.agc, ref.agc);
2666 JsonHelper::Member_ForceChange(allocator,
"tonefx", data.tonefx, ref.tonefx);
2667 JsonHelper::Member_ForceChange(allocator,
"stereofx", data.stereofx, ref.stereofx);
2668 JsonHelper::Member_ForceChange(allocator,
"bandprocess", data.bandprocess, ref.bandprocess);
2669 JsonHelper::Member_ForceChange(allocator,
"bandlimiter", data.bandlimiter, ref.bandlimiter);
2670 JsonHelper::Member_ForceChange(allocator,
"limiter", data.limiter, ref.limiter);
2671 JsonHelper::Member_ForceChange(allocator,
"out", data.out, ref.out);
2672 JsonHelper::Member_ForceChange(allocator,
"r128", data.r128, ref.r128);
2674 JsonHelper::Member_ForceChange(allocator,
"settings", data.settings, ref.settings);
static bool ToJson(JSON_Value &json, const json_agc &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_agc &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_agc > &constraints=JsonConstraint< json_agc >())
static void ForceChange(const json_agc &data[[maybe_unused]], json_agc &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_agc &data[[maybe_unused]], json_agc &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_band_peakhold &data[[maybe_unused]], json_band_peakhold &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_band_peakhold &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_band_peakhold > &constraints=JsonConstraint< json_band_peakhold >())
static bool ToJson(JSON_Value &json, const json_band_peakhold &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_band_peakhold &data[[maybe_unused]], json_band_peakhold &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_bandlim_peakhold &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_bandlim_peakhold &data[[maybe_unused]], json_bandlim_peakhold &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_bandlim_peakhold &data[[maybe_unused]], json_bandlim_peakhold &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_bandlim_peakhold &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_bandlim_peakhold > &constraints=JsonConstraint< json_bandlim_peakhold >())
static void ForceChange(const json_bandlimiter &data[[maybe_unused]], json_bandlimiter &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_bandlimiter &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_bandlimiter > &constraints=JsonConstraint< json_bandlimiter >())
static bool ToJson(JSON_Value &json, const json_bandlimiter &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_bandlimiter &data[[maybe_unused]], json_bandlimiter &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_bandprocess &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_bandprocess > &constraints=JsonConstraint< json_bandprocess >())
static bool ToJson(JSON_Value &json, const json_bandprocess &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_bandprocess &data[[maybe_unused]], json_bandprocess &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_bandprocess &data[[maybe_unused]], json_bandprocess &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_limiter &data[[maybe_unused]], json_limiter &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_limiter &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_limiter > &constraints=JsonConstraint< json_limiter >())
static bool ToJson(JSON_Value &json, const json_limiter &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_limiter &data[[maybe_unused]], json_limiter &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_output &data[[maybe_unused]], json_output &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_output &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_output &data[[maybe_unused]], json_output &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_output &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_output > &constraints=JsonConstraint< json_output >())
static bool DiffToJson(JSON_Value &json, const json_peak_percent &data[[maybe_unused]], json_peak_percent &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_peak_percent &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_peak_percent > &constraints=JsonConstraint< json_peak_percent >())
static void ForceChange(const json_peak_percent &data[[maybe_unused]], json_peak_percent &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_peak_percent &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_peakhold &data[[maybe_unused]], json_peakhold &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_peakhold &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_peakhold > &constraints=JsonConstraint< json_peakhold >())
static bool ToJson(JSON_Value &json, const json_peakhold &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_peakhold &data[[maybe_unused]], json_peakhold &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_peakhold_stereo &data[[maybe_unused]], json_peakhold_stereo &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_peakhold_stereo &data[[maybe_unused]], json_peakhold_stereo &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_peakhold_stereo &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_peakhold_stereo > &constraints=JsonConstraint< json_peakhold_stereo >())
static bool ToJson(JSON_Value &json, const json_peakhold_stereo &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_preset &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_preset &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_preset > &constraints=JsonConstraint< json_preset >())
static void ForceChange(const json_preset &data[[maybe_unused]], json_preset &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_preset &data[[maybe_unused]], json_preset &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_preset_setup &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_preset_setup > &constraints=JsonConstraint< json_preset_setup >())
static void ForceChange(const json_preset_setup &data[[maybe_unused]], json_preset_setup &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_preset_setup &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_preset_setup &data[[maybe_unused]], json_preset_setup &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_r128 &data[[maybe_unused]], json_r128 &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_r128 &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_r128 > &constraints=JsonConstraint< json_r128 >())
static void ForceChange(const json_r128 &data[[maybe_unused]], json_r128 &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_r128 &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_r128_settings &data[[maybe_unused]], json_r128_settings &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_r128_settings &data[[maybe_unused]], json_r128_settings &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_r128_settings &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_r128_settings > &constraints=JsonConstraint< json_r128_settings >())
static bool ToJson(JSON_Value &json, const json_r128_settings &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_settings &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_settings > &constraints=JsonConstraint< json_settings >())
static void ForceChange(const json_settings &data[[maybe_unused]], json_settings &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_settings &data[[maybe_unused]], json_settings &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_settings &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_settings_gain &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_settings_gain > &constraints=JsonConstraint< json_settings_gain >())
static void ForceChange(const json_settings_gain &data[[maybe_unused]], json_settings_gain &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_settings_gain &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_settings_gain &data[[maybe_unused]], json_settings_gain &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_settings_general &data[[maybe_unused]], json_settings_general &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_settings_general &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_settings_general > &constraints=JsonConstraint< json_settings_general >())
static void ForceChange(const json_settings_general &data[[maybe_unused]], json_settings_general &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_settings_general &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_stereofx &data[[maybe_unused]], json_stereofx &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_stereofx &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_stereofx > &constraints=JsonConstraint< json_stereofx >())
static bool ToJson(JSON_Value &json, const json_stereofx &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_stereofx &data[[maybe_unused]], json_stereofx &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_tonefx &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_tonefx > &constraints=JsonConstraint< json_tonefx >())
static bool ToJson(JSON_Value &json, const json_tonefx &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_tonefx &data[[maybe_unused]], json_tonefx &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_tonefx &data[[maybe_unused]], json_tonefx &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const json_vu &data[[maybe_unused]], json_vu &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_vu &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_vu &data[[maybe_unused]], json_vu &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool FromJson(const JSON_Value &json, json_vupeakhold_stereo &data[[maybe_unused]], int flags[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]], const JsonConstraint< json_vupeakhold_stereo > &constraints=JsonConstraint< json_vupeakhold_stereo >())
static bool DiffToJson(JSON_Value &json, const json_vupeakhold_stereo &data[[maybe_unused]], json_vupeakhold_stereo &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const json_vupeakhold_stereo &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const json_vupeakhold_stereo &data[[maybe_unused]], json_vupeakhold_stereo &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_agc &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_agc &data[[maybe_unused]], jsonvu_agc &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_agc &data[[maybe_unused]], jsonvu_agc &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_bandlimiter &data[[maybe_unused]], jsonvu_bandlimiter &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_bandlimiter &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_bandlimiter &data[[maybe_unused]], jsonvu_bandlimiter &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_bandprocess &data[[maybe_unused]], jsonvu_bandprocess &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_bandprocess &data[[maybe_unused]], jsonvu_bandprocess &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_bandprocess &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_limiter &data[[maybe_unused]], jsonvu_limiter &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_limiter &data[[maybe_unused]], jsonvu_limiter &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_limiter &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_output &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_output &data[[maybe_unused]], jsonvu_output &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_output &data[[maybe_unused]], jsonvu_output &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_preset_setup &data[[maybe_unused]], jsonvu_preset_setup &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_preset_setup &data[[maybe_unused]], jsonvu_preset_setup &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_preset_setup &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_r128 &data[[maybe_unused]], jsonvu_r128 &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_r128 &data[[maybe_unused]], jsonvu_r128 &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_r128 &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_r128_settings &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_r128_settings &data[[maybe_unused]], jsonvu_r128_settings &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_r128_settings &data[[maybe_unused]], jsonvu_r128_settings &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_settings &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_settings &data[[maybe_unused]], jsonvu_settings &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_settings &data[[maybe_unused]], jsonvu_settings &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_settings_gain &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_settings_gain &data[[maybe_unused]], jsonvu_settings_gain &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_settings_gain &data[[maybe_unused]], jsonvu_settings_gain &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_settings_general &data[[maybe_unused]], jsonvu_settings_general &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_settings_general &data[[maybe_unused]], jsonvu_settings_general &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_settings_general &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_stereofx &data[[maybe_unused]], jsonvu_stereofx &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_stereofx &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_stereofx &data[[maybe_unused]], jsonvu_stereofx &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool DiffToJson(JSON_Value &json, const jsonvu_tonefx &data[[maybe_unused]], jsonvu_tonefx &ref[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static bool ToJson(JSON_Value &json, const jsonvu_tonefx &data[[maybe_unused]], int flags, JSON_Document::AllocatorType &allocator[[maybe_unused]])
static void ForceChange(const jsonvu_tonefx &data[[maybe_unused]], jsonvu_tonefx &ref[[maybe_unused]], JSON_Document::AllocatorType &allocator[[maybe_unused]])
@ e_bs1770_vutype_LongTerm
@ e_bs1770_vutype_ShortTerm
@ e_bs1770_vutype_Momentary
@ e_history_var_in_bs_long
@ e_history_var_out_bs_long
@ e_lk_mode_Mixed_Channel
@ e_lim_release_Medium_Slow
@ e_lim_release_Medium_Fast
JsonConvert_ENUM(e_lim_release)