Skip to content

Commit

Permalink
Store mute flag and preMuteVolume to user settings file to be restore…
Browse files Browse the repository at this point in the history
…d at next application start.
  • Loading branch information
energy6 committed Oct 7, 2011
1 parent f99c91c commit ce57768
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,9 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
pElement = pRootElement->FirstChildElement("audio");
if (pElement)
{
XMLUtils::GetBoolean(pElement, "mute", m_bMute);
GetInteger(pElement, "volumelevel", m_nVolumeLevel, VOLUME_MAXIMUM, VOLUME_MINIMUM, VOLUME_MAXIMUM);
GetInteger(pElement, "premutevolumelevel", m_iPreMuteVolumeLevel, 0, 0, 100);
GetInteger(pElement, "dynamicrangecompression", m_dynamicRangeCompressionLevel, VOLUME_DRC_MINIMUM, VOLUME_DRC_MINIMUM, VOLUME_DRC_MAXIMUM);
}

Expand Down Expand Up @@ -899,7 +901,9 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
TiXmlElement volumeNode("audio");
pNode = pRoot->InsertEndChild(volumeNode);
if (!pNode) return false;
XMLUtils::SetBoolean(pNode, "mute", m_bMute);
XMLUtils::SetInt(pNode, "volumelevel", m_nVolumeLevel);
XMLUtils::SetInt(pNode, "premutevolumelevel", m_iPreMuteVolumeLevel);
XMLUtils::SetInt(pNode, "dynamicrangecompression", m_dynamicRangeCompressionLevel);

SaveCalibration(pRoot);
Expand Down

0 comments on commit ce57768

Please sign in to comment.