diff --git a/CMakeLists.txt b/CMakeLists.txt index 68d62c2..8cc78e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ else() endif() project(LiveTraffic - VERSION 3.4.0 + VERSION 3.4.1 DESCRIPTION "LiveTraffic X-Plane plugin") # Provide compile macros from the above project version definition diff --git a/Include/DataRefs.h b/Include/DataRefs.h index b7eb906..4c3ac5d 100644 --- a/Include/DataRefs.h +++ b/Include/DataRefs.h @@ -44,6 +44,16 @@ const int DEF_FD_REFRESH_INTVL = 20; ///< how often to fetch new flig const int DEF_FD_LONG_REFR_INTVL= 60; ///< how often to fetch new flight data if flying high const int DEF_FD_BUF_PERIOD = 90; ///< seconds to buffer before simulating aircraft const int DEF_FD_REDUCE_HEIGHT = 10000; ///< height AGL considered "flying high" +const int DEF_CONTR_ALT_MIN = 25000; ///< [ft] Auto Contrails: Minimum altitude +const int DEF_CONTR_ALT_MAX = 45000; ///< [ft] Auto Contrails: Maximum altitude +const int DEF_CONTR_LIFETIME = 25; ///< [s] Contrail default time to live +const bool DEF_CONTR_MULTI = false; ///< Auto-create multiple or just a single contrail? +#if LIN // On Linux, there more reports of issues if using separate FMOD, so we keep it disabled by default: +const bool DEF_SND_FMOD_INST = false; ///< Enforce using our own FMOD instance instead of X-Plane's? +#else // There have been various CTD reports with complex aircraft if using X-Plane's FMOD, so we keep this enabled by default: +const bool DEF_SND_FMOD_INST = true; ///< Enforce using our own FMOD instance instead of X-Plane's? +#endif +const int DEF_SUI_TRANSP = 0; ///< Settings UI: transaprent background? const int MIN_NETW_TIMEOUT = 5; ///< [s] minimum network request timeout const int DEF_NETW_TIMEOUT = 90; ///< [s] of network request timeout @@ -352,6 +362,7 @@ enum dataRefsLT { DR_CFG_AIRCRAFT_DISPLAYED, DR_CFG_AUTO_START, DR_CFG_MASTER_VOLUME, + DR_CFG_SND_FORCE_FMOD_INSTANCE, DR_CFG_AI_ON_REQUEST, DR_CFG_AI_UNDER_CONTROL, DR_CFG_AI_NOT_ON_GND, @@ -655,6 +666,7 @@ class DataRefs // generic config values int bAutoStart = true; ///< shall display a/c right after startup? int volMaster = 100; ///< Master Volume in Percent + int sndForceFmodInstance= DEF_SND_FMOD_INST; ///< Sound: Force using our own FMOD instance (instead of using XP's) int bAIonRequest = false; ///< acquire multiplayer control for TCAS on request only, not automatically? bool bAwaitingAIControl = false; ///< have in vain tried acquiring AI control and are waiting for callback now? int bAINotOnGnd = false; ///< shall a/c on the ground be hidden from TCAS/AI? @@ -683,10 +695,10 @@ class DataRefs int hideInReplay = false; ///< Shall no planes been shown while in Replay mode (to avoid collisions)? int hideStaticTwr = true; ///< filter out TWR objects from the channels int cpyObjFiles = 1; ///< copy `.obj` files for replacing dataRefs and textures - int contrailAltMin_ft = 25000; ///< [ft] Auto Contrails: Minimum altitude - int contrailAltMax_ft = 45000; ///< [ft] Auto Contrails: Maximum altitude - int contrailLifeTime = 25; ///< [s] Contrail default time to live - bool contrailMulti = false; ///< Auto-create multiple or just a single contrail? + int contrailAltMin_ft = DEF_CONTR_ALT_MIN; ///< [ft] Auto Contrails: Minimum altitude + int contrailAltMax_ft = DEF_CONTR_ALT_MAX; ///< [ft] Auto Contrails: Maximum altitude + int contrailLifeTime = DEF_CONTR_LIFETIME; ///< [s] Contrail default time to live + bool contrailMulti = DEF_CONTR_MULTI; ///< Auto-create multiple or just a single contrail? int remoteSupport = 0; ///< support XPMP2 Remote Client? (3-way: -1 off, 0 auto, 1 on) int bUseExternalCamera = false; ///< Do not activate LiveTraffic's camera view when hitting the camera button (intended for a 3rd party camera plugin to activate instead based on reading livetraffic/camera/... dataRefs or using LTAPI) @@ -757,7 +769,7 @@ class DataRefs // Settings UI WndRect SUIrect; ///< Settings UI Window position - int SUItransp = 0; ///< Settings UI: transaprent background? + int SUItransp = DEF_SUI_TRANSP; ///< Settings UI: transaprent background? // A/C Info Window(s) WndRect ACIrect; ///< A/C Info Window position @@ -890,6 +902,7 @@ class DataRefs // specific access inline bool GetAutoStart() const { return bAutoStart != 0; } int GetVolumeMaster() const { return volMaster; } + bool ShallForceFmodInstance() const { return sndForceFmodInstance != 0; } inline bool IsAIonRequest() const { return bAIonRequest != 0; } bool IsAINotOnGnd() const { return bAINotOnGnd != 0; } static int HaveAIUnderControl(void* =NULL) { return XPMPHasControlOfAIAircraft(); } diff --git a/Lib/XPMP2 b/Lib/XPMP2 index 5ca14f2..0a65b95 160000 --- a/Lib/XPMP2 +++ b/Lib/XPMP2 @@ -1 +1 @@ -Subproject commit 5ca14f2f8dbfce0593a4ce2cfc83cc47b08fa88a +Subproject commit 0a65b9520f622710b31bb0f2908416c2db7da6a5 diff --git a/LiveTraffic.xcodeproj/project.pbxproj b/LiveTraffic.xcodeproj/project.pbxproj index 43e9bbb..ceb0c20 100755 --- a/LiveTraffic.xcodeproj/project.pbxproj +++ b/LiveTraffic.xcodeproj/project.pbxproj @@ -790,7 +790,7 @@ LIVETRAFFIC_VERSION_BETA = 0; LIVETRAFFIC_VER_MAJOR = 3; LIVETRAFFIC_VER_MINOR = 4; - LIVETRAFFIC_VER_PATCH = 0; + LIVETRAFFIC_VER_PATCH = 1; LLVM_LTO = NO; MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.15; @@ -896,7 +896,7 @@ LIVETRAFFIC_VERSION_BETA = 0; LIVETRAFFIC_VER_MAJOR = 3; LIVETRAFFIC_VER_MINOR = 4; - LIVETRAFFIC_VER_PATCH = 0; + LIVETRAFFIC_VER_PATCH = 1; LLVM_LTO = YES; MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.15; diff --git a/Src/DataRefs.cpp b/Src/DataRefs.cpp index 7fbbb3d..dafef58 100644 --- a/Src/DataRefs.cpp +++ b/Src/DataRefs.cpp @@ -506,6 +506,7 @@ DataRefs::dataRefDefinitionT DATA_REFS_LT[CNT_DATAREFS_LT] = { {"livetraffic/cfg/aircrafts_displayed", DataRefs::LTGetInt, DataRefs::LTSetAircraftDisplayed, GET_VAR, false }, {"livetraffic/cfg/auto_start", DataRefs::LTGetInt, DataRefs::LTSetCfgValue, GET_VAR, true }, {"livetraffic/cfg/volume/master", DataRefs::LTGetInt, DataRefs::LTSetCfgValue, GET_VAR, true }, + {"livetraffic/cfg/sound/force_fmod_instance", DataRefs::LTGetInt, DataRefs::LTSetBool, GET_VAR, true, true }, {"livetraffic/cfg/ai_on_request", DataRefs::LTGetInt, DataRefs::LTSetCfgValue, GET_VAR, true }, {"livetraffic/cfg/ai_controlled", DataRefs::HaveAIUnderControl, NULL, NULL, false }, {"livetraffic/cfg/ai_not_on_gnd", DataRefs::LTGetInt, DataRefs::LTSetCfgValue, GET_VAR, true }, @@ -592,6 +593,7 @@ void* DataRefs::getVarAddr (dataRefsLT dr) case DR_CFG_AIRCRAFT_DISPLAYED: return &bShowingAircraft; case DR_CFG_AUTO_START: return &bAutoStart; case DR_CFG_MASTER_VOLUME: return &volMaster; + case DR_CFG_SND_FORCE_FMOD_INSTANCE:return &sndForceFmodInstance; case DR_CFG_AI_ON_REQUEST: return &bAIonRequest; case DR_CFG_AI_NOT_ON_GND: return &bAINotOnGnd; case DR_CFG_LABELS: return &labelCfg; @@ -1775,6 +1777,13 @@ void DataRefs::ResetAdvCfgToDefaults () fdBufPeriod = DEF_FD_BUF_PERIOD; fdReduceHeight = DEF_FD_REDUCE_HEIGHT; netwTimeout = DEF_NETW_TIMEOUT; + contrailAltMin_ft = DEF_CONTR_ALT_MIN; + contrailAltMax_ft = DEF_CONTR_ALT_MAX; + contrailLifeTime = DEF_CONTR_LIFETIME; + contrailMulti = DEF_CONTR_MULTI; + sndForceFmodInstance= DEF_SND_FMOD_INST; + MsgRect.clear(); + SUItransp = DEF_SUI_TRANSP; UIFontScale = DEF_UI_FONT_SCALE; UIopacity = DEF_UI_OPACITY; } diff --git a/Src/LTMain.cpp b/Src/LTMain.cpp index dc0f545..f92b31f 100644 --- a/Src/LTMain.cpp +++ b/Src/LTMain.cpp @@ -898,12 +898,12 @@ int MPIntPrefsFunc (const char*, const char* key, int iDefault) if (!strcmp(key, XPMP_CFG_ITM_CONTR_LIFE)) return dataRefs.GetContrailLifeTime(); if (!strcmp(key, XPMP_CFG_ITM_CONTR_MULTI)) return dataRefs.GetContrailMulti(); // Support XPMP2 Remote Clinet? - if (!strcmp(key, XPMP_CFG_ITM_SUPPORT_REMOTE)) - return dataRefs.GetRemoteSupport(); + if (!strcmp(key, XPMP_CFG_ITM_SUPPORT_REMOTE)) return dataRefs.GetRemoteSupport(); // Sound if enabled - if (!strcmp(key, XPMP_CFG_ITM_ACTIVATE_SOUND)) - return dataRefs.GetVolumeMaster() > 0; - + if (!strcmp(key, XPMP_CFG_ITM_ACTIVATE_SOUND)) return dataRefs.GetVolumeMaster() > 0; + // Force own FMOD instance? + if (!strcmp(key, XPMP_CFG_ITM_FMOD_INSTANCE)) return dataRefs.ShallForceFmodInstance(); + // dont' know/care about the option, return the default value return iDefault; } diff --git a/Src/SettingsUI.cpp b/Src/SettingsUI.cpp index efe9bc6..18738d1 100644 --- a/Src/SettingsUI.cpp +++ b/Src/SettingsUI.cpp @@ -808,6 +808,15 @@ void LTSettingsUI::buildInterface() if (!*sFilter) ImGui::TreePop(); } + if (ImGui::TreeNodeHelp("Miscellaneous", nCol, nullptr, nullptr, sFilter, nOpCl, + ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_SpanFullWidth)) + { + ImGui::FilteredCfgCheckbox("Own FMOD Instance", sFilter, DR_CFG_SND_FORCE_FMOD_INSTANCE, + "Enforce using separate FMOD instance instead of X-Plane's.\n(Takes effect after restart only.)"); + + if (!*sFilter) ImGui::TreePop(); + } + if (ImGui::TreeNodeHelp("Export", nCol, nullptr, nullptr, sFilter, nOpCl, ImGuiTreeNodeFlags_SpanFullWidth)) { diff --git a/docs/readme.html b/docs/readme.html index 20a1fa2..de00aaa 100755 --- a/docs/readme.html +++ b/docs/readme.html @@ -128,13 +128,31 @@

Release Notes

v3

-

v3.4.0

+

v3.4.1

Update: In case of doubt you can always just copy all files from the archive over the files of your existing installation.

+

At least copy the following files, which have changed compared to v3.4.0:

+ + +

Change log:

+ + + +

v3.4.0

+

At least copy the following files, which have changed compared to v3.3.2: