mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-07 14:51:08 +00:00
Re-implement (optionally) pre-decoding audio to reduce disk seek/decoding time.
This was removed in HG changeset 7ec478d993b7, and is now implemented in a way that is better than before: voice overs and music no longer cause decoding lag, as they are always decoded on-the-fly. The additional memory use (~40 MB) should be no problem for anyone. The default is still to decode everything on the fly.
This commit is contained in:
parent
fdce574cc5
commit
c02ea1ce83
5 changed files with 148 additions and 17 deletions
|
@ -87,12 +87,17 @@ void UserSettings::save()
|
|||
}
|
||||
xml_audio.InsertEndChild(xml_volume);
|
||||
|
||||
|
||||
TiXmlElement xml_device("Device");
|
||||
{
|
||||
xml_device.SetAttribute("name", audio.deviceName);
|
||||
}
|
||||
xml_audio.InsertEndChild(xml_device);
|
||||
|
||||
TiXmlElement xml_prebuf("Prebuffer");
|
||||
{
|
||||
xml_prebuf.SetAttribute("on", audio.prebuffer);
|
||||
}
|
||||
xml_audio.InsertEndChild(xml_prebuf);
|
||||
}
|
||||
doc.InsertEndChild(xml_audio);
|
||||
|
||||
|
@ -393,6 +398,12 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
|
|||
{
|
||||
audio.deviceName = xml_device->Attribute("name");
|
||||
}
|
||||
|
||||
TiXmlElement *xml_prebuf = xml_audio->FirstChildElement("Prebuffer");
|
||||
if (xml_prebuf)
|
||||
{
|
||||
xml_prebuf->Attribute("on", &audio.prebuffer);
|
||||
}
|
||||
}
|
||||
TiXmlElement *xml_video = doc.FirstChildElement("Video");
|
||||
if (xml_video)
|
||||
|
@ -547,6 +558,8 @@ void UserSettings::apply()
|
|||
}
|
||||
|
||||
dsq->bindInput();
|
||||
|
||||
core->settings.prebufferSounds = audio.prebuffer;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue