Get all properties for a specific frame
| 137 | |
| 138 | // Get all properties for a specific frame |
| 139 | std::string Robotization::PropertiesJSON(int64_t requested_frame) const { |
| 140 | |
| 141 | // Generate JSON properties list |
| 142 | Json::Value root = BasePropertiesJSON(requested_frame); |
| 143 | |
| 144 | // Keyframes |
| 145 | root["fft_size"] = add_property_json("FFT Size", fft_size, "int", "", NULL, 0, 8, false, requested_frame); |
| 146 | root["hop_size"] = add_property_json("Hop Size", hop_size, "int", "", NULL, 0, 2, false, requested_frame); |
| 147 | root["window_type"] = add_property_json("Window Type", window_type, "int", "", NULL, 0, 3, false, requested_frame); |
| 148 | |
| 149 | // Add fft_size choices (dropdown style) |
| 150 | root["fft_size"]["choices"].append(add_property_choice_json("128", FFT_SIZE_128, fft_size)); |
| 151 | root["fft_size"]["choices"].append(add_property_choice_json("256", FFT_SIZE_256, fft_size)); |
| 152 | root["fft_size"]["choices"].append(add_property_choice_json("512", FFT_SIZE_512, fft_size)); |
| 153 | root["fft_size"]["choices"].append(add_property_choice_json("1024", FFT_SIZE_1024, fft_size)); |
| 154 | root["fft_size"]["choices"].append(add_property_choice_json("2048", FFT_SIZE_2048, fft_size)); |
| 155 | |
| 156 | // Add hop_size choices (dropdown style) |
| 157 | root["hop_size"]["choices"].append(add_property_choice_json("1/2", HOP_SIZE_2, hop_size)); |
| 158 | root["hop_size"]["choices"].append(add_property_choice_json("1/4", HOP_SIZE_4, hop_size)); |
| 159 | root["hop_size"]["choices"].append(add_property_choice_json("1/8", HOP_SIZE_8, hop_size)); |
| 160 | |
| 161 | // Add window_type choices (dropdown style) |
| 162 | root["window_type"]["choices"].append(add_property_choice_json("Rectangular", RECTANGULAR, window_type)); |
| 163 | root["window_type"]["choices"].append(add_property_choice_json("Bart Lett", BART_LETT, window_type)); |
| 164 | root["window_type"]["choices"].append(add_property_choice_json("Hann", HANN, window_type)); |
| 165 | root["window_type"]["choices"].append(add_property_choice_json("Hamming", HAMMING, window_type)); |
| 166 | |
| 167 | // Return formatted string |
| 168 | return root.toStyledString(); |
| 169 | } |
nothing calls this directly
no outgoing calls
no test coverage detected