Skip to content
Snippets Groups Projects
Commit 36ef9350 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#5709: Add always recording option in configuration

parent d8940cdc
No related branches found
No related tags found
No related merge requests found
......@@ -533,6 +533,7 @@ void AudioPreference::serialize (Conf::YamlEmitter *emitter)
// general preference
Conf::ScalarNode recordpath (_recordpath); //: /home/msavard/Bureau
Conf::ScalarNode alwaysRecording(_alwaysRecording ? "true" : "false");
std::stringstream micstr;
micstr << _volumemic;
Conf::ScalarNode volumemic (micstr.str()); //: 100
......@@ -541,6 +542,7 @@ void AudioPreference::serialize (Conf::YamlEmitter *emitter)
Conf::ScalarNode volumespkr (spkrstr.str()); //: 100
Conf::ScalarNode noise (_noisereduce ? "true":"false");
preferencemap.setKeyValue (recordpathKey, &recordpath);
preferencemap.setKeyValue (alwaysRecordingKey, &alwaysRecording);
preferencemap.setKeyValue (volumemicKey, &volumemic);
preferencemap.setKeyValue (volumespkrKey, &volumespkr);
......@@ -583,6 +585,13 @@ void AudioPreference::unserialize (Conf::MappingNode *map)
val = NULL;
}
val = (Conf::ScalarNode *) (map->getValue (alwaysRecordingKey));
if(val) {
_alwaysRecording = (val->getValue() == "true");
val = NULL;
}
val = (Conf::ScalarNode *) (map->getValue (volumemicKey));
if (val) {
......
......@@ -83,6 +83,7 @@ const Conf::Key devicePlaybackKey ("devicePlayback");//:
const Conf::Key deviceRecordKey ("deviceRecord");// :
const Conf::Key deviceRingtoneKey ("deviceRingtone");// :
const Conf::Key recordpathKey ("recordPath");//: /home/msavard/Bureau
const Conf::Key alwaysRecordingKey("alwaysRecording");
const Conf::Key volumemicKey ("volumeMic");//: 100
const Conf::Key volumespkrKey ("volumeSpkr");//: 100
const Conf::Key noiseReduceKey ("noiseReduce");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment