diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 09:29:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 09:29:46 +0000 |
commit | 43b857ba815ecf82cd9ac8b90d49937fa4a8a71a (patch) | |
tree | 9bf6d9490ce23a686cb9d7e69ae4c3360e4bbfa6 /xbmc/cores | |
parent | Releasing progress-linux version 2:20.4+dfsg-1~progress7.99u1. (diff) | |
download | kodi-43b857ba815ecf82cd9ac8b90d49937fa4a8a71a.tar.xz kodi-43b857ba815ecf82cd9ac8b90d49937fa4a8a71a.zip |
Merging upstream version 2:20.5+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xbmc/cores')
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 7 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp index a7fb55c..247ad52 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp @@ -11,7 +11,9 @@ #include "ServiceBroker.h" #include "cores/AudioEngine/AESinkFactory.h" #include "cores/AudioEngine/Utils/AEUtil.h" +#include "settings/AdvancedSettings.h" #include "settings/Settings.h" +#include "settings/SettingsComponent.h" #include "utils/StringUtils.h" #include "utils/TimeUtils.h" #include "utils/log.h" @@ -421,6 +423,9 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device) } } + m_superviseAudioDelay = + CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_superviseAudioDelay; + int atChannelMask = AEChannelMapToAUDIOTRACKChannelMask(m_format.m_channelLayout); m_format.m_channelLayout = AUDIOTRACKChannelMaskToAEChannelMap(atChannelMask); if (m_encoding == CJNIAudioFormat::ENCODING_IEC61937) @@ -848,7 +853,7 @@ unsigned int CAESinkAUDIOTRACK::AddPackets(uint8_t **data, unsigned int frames, const double max_stuck_delay_ms = m_audiotrackbuffer_sec_orig * 2000.0; const double stime_ms = 1000.0 * frames / m_format.m_sampleRate; - if (m_stuckCounter * stime_ms > max_stuck_delay_ms) + if (m_superviseAudioDelay && (m_stuckCounter * stime_ms > max_stuck_delay_ms)) { CLog::Log(LOGERROR, "Sink got stuck with {:f} ms - ask AE for reopening", max_stuck_delay_ms); usleep(max_stuck_delay_ms * 1000); diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h index 6e9ec76..c1d7360 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h +++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h @@ -96,6 +96,7 @@ private: double m_hw_delay = 0.0; CJNIAudioTimestamp m_timestamp; XbmcThreads::EndTime<> m_stampTimer; + bool m_superviseAudioDelay = false; std::vector<float> m_floatbuf; std::vector<int16_t> m_shortbuf; |