| 244 | |
| 245 | |
| 246 | Json Voice::saveJson() const { |
| 247 | return JsonObject{ |
| 248 | {"enabled", m_enabled}, |
| 249 | {"deviceName", m_deviceName ? *m_deviceName : Json()}, |
| 250 | {"inputEnabled", m_inputEnabled}, |
| 251 | {"threshold", m_threshold}, |
| 252 | {"inputVolume", m_inputVolume}, |
| 253 | {"outputVolume", m_outputVolume}, |
| 254 | {"inputMode", VoiceInputModeNames.getRight(m_inputMode)}, |
| 255 | {"channelMode", VoiceChannelModeNames.getRight(m_channelMode)}, |
| 256 | {"loopback", m_loopback}, |
| 257 | {"version", 1} |
| 258 | }; |
| 259 | } |
| 260 | |
| 261 | void Voice::save() const { |
| 262 | if (Root* root = Root::singletonPtr()) { |