MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / saveJson

Method saveJson

source/frontend/StarVoice.cpp:246–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244
245
246Json 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
261void Voice::save() const {
262 if (Root* root = Root::singletonPtr()) {

Callers 1

makeVoiceCallbacksMethod · 0.80

Calls 1

JsonClass · 0.85

Tested by

no test coverage detected