diff options
author | Achim Turan <mail@achim-turan.de> | 2015-11-28 21:08:24 +0100 |
---|---|---|
committer | Achim Turan <mail@achim-turan.de> | 2015-12-07 19:21:00 +0100 |
commit | 35bad96b47f0e9a89af55153b0d8c20eb76e79f4 (patch) | |
tree | 01e48a6fabce8e7d30be701316e374acf04ab4ad | |
parent | 13894113b47cce2bf330b5b8506d6f19aa3e5d3c (diff) |
[adsp] ADSP addon get enabled status fix
-rw-r--r-- | xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSP.cpp | 13 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSPProcess.cpp | 12 |
2 files changed, 12 insertions, 13 deletions
diff --git a/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSP.cpp b/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSP.cpp index 1b230e4242..8f13bc3060 100644 --- a/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSP.cpp +++ b/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSP.cpp @@ -326,7 +326,7 @@ bool CActiveAEDSP::IsInUse(const std::string &strAddonId) const CSingleLock lock(m_critSection); for (AE_DSP_ADDONMAP_CITR citr = m_addonMap.begin(); citr != m_addonMap.end(); ++citr) - if (citr->second->Enabled() && citr->second->ID() == strAddonId) + if (!CAddonMgr::GetInstance().IsAddonDisabled(citr->second->ID()) && citr->second->ID() == strAddonId) return true; return false; } @@ -624,8 +624,7 @@ bool CActiveAEDSP::UpdateAndInitialiseAudioDSPAddons(bool bInitialiseAllAudioDSP for (unsigned iAddonPtr = 0; iAddonPtr < map.size(); ++iAddonPtr) { const AddonPtr dspAddon = map.at(iAddonPtr); - bool bEnabled = dspAddon->Enabled() && - !CAddonMgr::GetInstance().IsAddonDisabled(dspAddon->ID()); + bool bEnabled = !CAddonMgr::GetInstance().IsAddonDisabled(dspAddon->ID()); if (!bEnabled && IsKnownAudioDSPAddon(dspAddon)) { @@ -665,7 +664,7 @@ bool CActiveAEDSP::UpdateAndInitialiseAudioDSPAddons(bool bInitialiseAllAudioDSP } /* re-check the enabled status. newly installed dsps get disabled when they're added to the db */ - if (!bDisabled && addon->Enabled() && (status = addon->Create(iAddonId)) != ADDON_STATUS_OK) + if (!bDisabled && !CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && (status = addon->Create(iAddonId)) != ADDON_STATUS_OK) { CLog::Log(LOGWARNING, "ActiveAE DSP - %s - failed to create add-on %s, status = %d", __FUNCTION__, dspAddon->Name().c_str(), status); if (!addon.get() || !addon->DllLoaded() || status == ADDON_STATUS_PERMANENT_FAILURE) @@ -801,7 +800,7 @@ int CActiveAEDSP::RegisterAudioDSPAddon(AddonPtr addon) { int iAddonId(-1); - if (!addon->Enabled()) + if (CAddonMgr::GetInstance().IsAddonDisabled(addon->ID())) return -1; CLog::Log(LOGDEBUG, "ActiveAE DSP - %s - registering add-on '%s'", __FUNCTION__, addon->Name().c_str()); @@ -897,7 +896,7 @@ int CActiveAEDSP::EnabledAudioDSPAddonAmount(void) const for (AE_DSP_ADDONMAP_CITR citr = m_addonMap.begin(); citr != m_addonMap.end(); ++citr) { - if (citr->second->Enabled()) + if (!CAddonMgr::GetInstance().IsAddonDisabled(citr->second->ID())) ++iReturn; } @@ -916,7 +915,7 @@ int CActiveAEDSP::GetEnabledAudioDSPAddons(AE_DSP_ADDONMAP &addons) const for (AE_DSP_ADDONMAP_CITR citr = m_addonMap.begin(); citr != m_addonMap.end(); ++citr) { - if (citr->second->Enabled()) + if (!CAddonMgr::GetInstance().IsAddonDisabled(citr->second->ID())) { addons.insert(std::make_pair(citr->second->GetID(), citr->second)); ++iReturn; diff --git a/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSPProcess.cpp b/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSPProcess.cpp index 2de98c4951..2decc2dc92 100644 --- a/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSPProcess.cpp +++ b/xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSPProcess.cpp @@ -322,7 +322,7 @@ bool CActiveAEDSPProcess::Create(const AEAudioFormat &inputFormat, const AEAudio /// For resample only one call is allowed. Use first one and ignore everything else. CActiveAEDSPModePtr pMode = listInputResample[i].first; AE_DSP_ADDON addon = listInputResample[i].second; - if (addon->Enabled() && addon->SupportsInputResample() && pMode->IsEnabled()) + if (!CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && addon->SupportsInputResample() && pMode->IsEnabled()) { ADDON_HANDLE_STRUCT handle; AE_DSP_ERROR err = addon->StreamCreate(&m_addonSettings, &m_addonStreamProperties, &handle); @@ -374,7 +374,7 @@ bool CActiveAEDSPProcess::Create(const AEAudioFormat &inputFormat, const AEAudio { AE_DSP_ADDON addon = itr->second; int id = addon->GetID(); - if (addon->Enabled() && id != foundInputResamplerId) + if (!CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && id != foundInputResamplerId) { ADDON_HANDLE_STRUCT handle; AE_DSP_ERROR err = addon->StreamCreate(&m_addonSettings, &m_addonStreamProperties, &handle); @@ -415,7 +415,7 @@ bool CActiveAEDSPProcess::Create(const AEAudioFormat &inputFormat, const AEAudio if (m_usedMap.find(id) == m_usedMap.end()) continue; - if (addon->Enabled() && addon->SupportsPreProcess() && pMode->IsEnabled() && + if (!CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && addon->SupportsPreProcess() && pMode->IsEnabled() && addon->StreamIsModeSupported(&m_addon_Handles[id], pMode->ModeType(), pMode->AddonModeNumber(), pMode->ModeID())) { CLog::Log(LOGDEBUG, " | - %i - %s (%s)", i, pMode->AddonModeName().c_str(), addon->GetAudioDSPName().c_str()); @@ -445,7 +445,7 @@ bool CActiveAEDSPProcess::Create(const AEAudioFormat &inputFormat, const AEAudio if (m_usedMap.find(id) == m_usedMap.end()) continue; - if (addon->Enabled() && addon->SupportsMasterProcess() && pMode->IsEnabled() && + if (!CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && addon->SupportsMasterProcess() && pMode->IsEnabled() && addon->StreamIsModeSupported(&m_addon_Handles[id], pMode->ModeType(), pMode->AddonModeNumber(), pMode->ModeID())) { CLog::Log(LOGDEBUG, " | - %i - %s (%s)", i, pMode->AddonModeName().c_str(), addon->GetAudioDSPName().c_str()); @@ -520,7 +520,7 @@ bool CActiveAEDSPProcess::Create(const AEAudioFormat &inputFormat, const AEAudio if (m_usedMap.find(id) == m_usedMap.end()) continue; - if (addon->Enabled() && addon->SupportsPostProcess() && pMode->IsEnabled() && + if (!CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && addon->SupportsPostProcess() && pMode->IsEnabled() && addon->StreamIsModeSupported(&m_addon_Handles[id], pMode->ModeType(), pMode->AddonModeNumber(), pMode->ModeID())) { CLog::Log(LOGDEBUG, " | - %i - %s (%s)", i, pMode->AddonModeName().c_str(), addon->GetAudioDSPName().c_str()); @@ -554,7 +554,7 @@ bool CActiveAEDSPProcess::Create(const AEAudioFormat &inputFormat, const AEAudio int id = addon->GetID(); if (m_usedMap.find(id) != m_usedMap.end() && - addon->Enabled() && addon->SupportsOutputResample() && pMode->IsEnabled() && + !CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()) && addon->SupportsOutputResample() && pMode->IsEnabled() && addon->StreamIsModeSupported(&m_addon_Handles[id], pMode->ModeType(), pMode->AddonModeNumber(), pMode->ModeID())) { int outSamplerate = addon->OutputResampleSampleRate(&m_addon_Handles[id]); |