Skip to content

Commit

Permalink
Merge pull request #4 from AchimTuran/AudioDSP/V2/usability_core_fixes
Browse files Browse the repository at this point in the history
[WIP] AudioDSP V2 improvments
  • Loading branch information
AchimTuran authored Nov 8, 2016
2 parents f7b5603 + e1f945a commit da603fa
Show file tree
Hide file tree
Showing 15 changed files with 599 additions and 881 deletions.
27 changes: 1 addition & 26 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,24 +1444,7 @@ void CApplication::OnSettingChanged(const CSetting *setting)
g_windowManager.SendThreadMessage(msg);
}
else if (StringUtils::StartsWithNoCase(settingId, "audiooutput."))
{
if (settingId == CSettings::SETTING_AUDIOOUTPUT_DSPADDONSENABLED)
{
if (((CSettingBool *) setting)->GetValue())
{
CApplicationMessenger::GetInstance().PostMsg(TMSG_SETAUDIODSPSTATE, ACTIVE_AE_DSP_STATE_ON, ACTIVE_AE_DSP_SYNC_ACTIVATE);
CApplicationMessenger::GetInstance().PostMsg(TMSG_MEDIA_RESTART); // send non blocking media restart message
}
else
{
CAEFactory::OnSettingsChange(settingId);
CApplicationMessenger::GetInstance().PostMsg(TMSG_MEDIA_RESTART); // send non blocking media restart message
CApplicationMessenger::GetInstance().PostMsg(TMSG_SETAUDIODSPSTATE, ACTIVE_AE_DSP_STATE_OFF);
}
return;
}

// AE is master of audio settings and needs to be informed first
{ // AE is master of audio settings and needs to be informed first
CAEFactory::OnSettingsChange(settingId);

if (settingId == CSettings::SETTING_AUDIOOUTPUT_GUISOUNDMODE)
Expand Down Expand Up @@ -2492,13 +2475,6 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
break;
#endif

case TMSG_SETAUDIODSPSTATE:
if(pMsg->param1 == ACTIVE_AE_DSP_STATE_ON)
CServiceBroker::GetADSP().Activate();
else if(pMsg->param1 == ACTIVE_AE_DSP_STATE_OFF)
CServiceBroker::GetADSP().Deactivate();
break;

case TMSG_START_ANDROID_ACTIVITY:
{
#if defined(TARGET_ANDROID)
Expand Down Expand Up @@ -2937,7 +2913,6 @@ void CApplication::Stop(int exitCode)
if (CVideoLibraryQueue::GetInstance().IsRunning())
CVideoLibraryQueue::GetInstance().CancelAllJobs();

CServiceBroker::GetADSP().Deactivate();
CApplicationMessenger::GetInstance().Cleanup();

CLog::Log(LOGNOTICE, "stop player");
Expand Down
10 changes: 0 additions & 10 deletions xbmc/addons/GUIDialogAddonInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,6 @@ bool CGUIDialogAddonInfo::OnMessage(CGUIMessage& message)
}
else if (iControl == CONTROL_BTN_ENABLE)
{
//FIXME: should be moved to somewhere appropriate (e.g CAddonMgs::CanAddonBeDisabled or IsInUse) and button should be disabled
if (m_localAddon)
{
if (m_localAddon->Type() == ADDON_ADSPDLL && CServiceBroker::GetADSP().IsProcessing())
{
CGUIDialogOK::ShowAndGetInput(24137, 0, 24138, 0);
return true;
}
}

OnEnableDisable();
return true;
}
Expand Down
Loading

0 comments on commit da603fa

Please sign in to comment.