remove a bunch of obsolete advanced settings related to audio
authorRainer Hochecker <fernetmenta@online.de>
Sun, 20 Oct 2013 11:54:45 +0000 (13:54 +0200)
committerRainer Hochecker <fernetmenta@online.de>
Mon, 28 Oct 2013 11:54:51 +0000 (12:54 +0100)
xbmc/cores/AudioEngine/AESinkFactory.cpp
xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
xbmc/settings/AdvancedSettings.cpp
xbmc/settings/AdvancedSettings.h

index 906a824..e7fb9a3 100644 (file)
@@ -101,8 +101,7 @@ IAESink *CAESinkFactory::Create(std::string &device, AEAudioFormat &desiredForma
 
 
 #if defined(TARGET_WINDOWS)
-  if ((driver.empty() ||
-    driver == "WASAPI") && !g_advancedSettings.m_audioForceDirectSound)
+  if (driver == "WASAPI")
     TRY_SINK(WASAPI)
   else
     TRY_SINK(DirectSound) // always fall back to DirectSound
@@ -141,8 +140,7 @@ void CAESinkFactory::EnumerateEx(AESinkInfoList &list, bool force)
 {
 #if defined(TARGET_WINDOWS)
   ENUMERATE_SINK(DirectSound, force);
-  if (!g_advancedSettings.m_audioForceDirectSound)
-    ENUMERATE_SINK(WASAPI, force);
+  ENUMERATE_SINK(WASAPI, force);
 #elif defined(TARGET_ANDROID)
     ENUMERATE_SINK(AUDIOTRACK, force);
 #elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
index 623c035..94e2c5b 100644 (file)
@@ -500,12 +500,7 @@ unsigned int CAESinkWASAPI::AddPackets(uint8_t *data, unsigned int frames, bool
       return INT_MAX;
     }
 
-    /* Inject one buffer of silence if sink has just opened */
-    /* to avoid losing start of stream or GUI sound         */
-    if (g_advancedSettings.m_streamSilence)
-      memcpy(buf, data, NumFramesRequested * m_format.m_frameSize); //fill buffer with audio
-    else
-      memset(buf,    0, NumFramesRequested * m_format.m_frameSize); //fill buffer with silence
+    memset(buf, 0, NumFramesRequested * m_format.m_frameSize); //fill buffer with silence
 
     hr = m_pRenderClient->ReleaseBuffer(NumFramesRequested, flags); //pass back to audio driver
     if (FAILED(hr))
@@ -520,7 +515,7 @@ unsigned int CAESinkWASAPI::AddPackets(uint8_t *data, unsigned int frames, bool
     if (FAILED(hr))
       CLog::Log(LOGERROR, __FUNCTION__": AudioClient Start Failed");
     m_running = true; //signal that we're processing frames
-    return g_advancedSettings.m_streamSilence ? NumFramesRequested : 0U;
+    return 0U;
   }
 
 #ifndef _DEBUG
@@ -545,15 +540,8 @@ unsigned int CAESinkWASAPI::AddPackets(uint8_t *data, unsigned int frames, bool
   {
     if(eventAudioCallback != WAIT_OBJECT_0 || !&buf)
     {
-      /* Event handle timed out - flag sink as dirty for re-initializing */
       CLog::Log(LOGERROR, __FUNCTION__": Endpoint Buffer timed out");
-      if (g_advancedSettings.m_streamSilence)
-      {
-        m_isDirty = true; //flag new device or re-init needed
-        Deinitialize();
-        m_running = false;
-        return INT_MAX;
-      }
+      return INT_MAX;
     }
   }
 
index 0f30d84..619490d 100644 (file)
@@ -115,12 +115,6 @@ void CAdvancedSettings::Initialize()
   m_ac3Gain = 12.0f;
   m_audioApplyDrc = true;
   m_dvdplayerIgnoreDTSinWAV = false;
-  m_audioResample = 0;
-  m_allowTranscode44100 = false;
-  m_audioForceDirectSound = false;
-  m_audioAudiophile = false;
-  m_allChannelStereo = false;
-  m_streamSilence = false;
 
   //default hold time of 25 ms, this allows a 20 hertz sine to pass undistorted
   m_limiterHold = 0.025f;
@@ -502,14 +496,6 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
     XMLUtils::GetInt(pElement, "percentseekforwardbig", m_musicPercentSeekForwardBig, 0, 100);
     XMLUtils::GetInt(pElement, "percentseekbackwardbig", m_musicPercentSeekBackwardBig, -100, 0);
 
-    XMLUtils::GetInt(pElement, "resample", m_audioResample, 0, 192000);
-    XMLUtils::GetBoolean(pElement, "allowtranscode44100", m_allowTranscode44100);
-    XMLUtils::GetBoolean(pElement, "forceDirectSound", m_audioForceDirectSound);
-    XMLUtils::GetBoolean(pElement, "audiophile", m_audioAudiophile);
-    XMLUtils::GetBoolean(pElement, "allchannelstereo", m_allChannelStereo);
-    XMLUtils::GetBoolean(pElement, "streamsilence", m_streamSilence);
-    XMLUtils::GetString(pElement, "transcodeto", m_audioTranscodeTo);
-
     TiXmlElement* pAudioExcludes = pElement->FirstChildElement("excludefromlisting");
     if (pAudioExcludes)
       GetCustomRegexps(pAudioExcludes, m_audioExcludeFromListingRegExps);
index e6e02ad..d46ee0b 100644 (file)
@@ -138,13 +138,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
     CStdString m_audioDefaultPlayer;
     float m_audioPlayCountMinimumPercent;
     bool m_dvdplayerIgnoreDTSinWAV;
-    int m_audioResample;
-    bool m_allowTranscode44100;
-    bool m_audioForceDirectSound;
-    bool m_audioAudiophile;
-    bool m_allChannelStereo;
-    bool m_streamSilence;
-    CStdString m_audioTranscodeTo;
     float m_limiterHold;
     float m_limiterRelease;