added setting for fast seeking

This commit is contained in:
itsmattkc
2018-12-17 21:12:51 +11:00
parent a9b8908988
commit 302310ab7b
5 changed files with 45 additions and 3 deletions
+6 -1
View File
@@ -30,7 +30,8 @@ Config::Config()
enable_audio_scrubbing(true),
drop_on_media_to_replace(true),
autoscroll(AUTOSCROLL_PAGE_SCROLL),
audio_rate(48000)
audio_rate(48000),
fast_seeking(false)
{}
void Config::load(QString path) {
@@ -107,6 +108,9 @@ void Config::load(QString path) {
} else if (stream.name() == "AudioRate") {
stream.readNext();
audio_rate = stream.text().toInt();
} else if (stream.name() == "FastSeeking") {
stream.readNext();
fast_seeking = (stream.text() == "1");
}
}
}
@@ -153,6 +157,7 @@ void Config::save(QString path) {
stream.writeTextElement("DropFileOnMediaToReplace", QString::number(drop_on_media_to_replace));
stream.writeTextElement("Autoscroll", QString::number(autoscroll));
stream.writeTextElement("AudioRate", QString::number(audio_rate));
stream.writeTextElement("FastSeeking", QString::number(fast_seeking));
stream.writeEndElement(); // configuration
stream.writeEndDocument(); // doc