diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-02-01 17:47:35 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2021-02-01 17:47:35 +0100 |
commit | 5843994ae4dfaf824cea5bb64708f6fd7c22f031 (patch) | |
tree | 063267d85f8bc43c0d2eaff372fa0e1af17e4ffb /src/encoder | |
parent | 9557eeedea2a3472098d7e53be97ed51b83ba947 (diff) |
Avoid log spam when probing fdkaac libraries
Diffstat (limited to 'src/encoder')
-rw-r--r-- | src/encoder/encoderfdkaac.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/encoder/encoderfdkaac.cpp b/src/encoder/encoderfdkaac.cpp index 94a50248e2..17d055a4bf 100644 --- a/src/encoder/encoderfdkaac.cpp +++ b/src/encoder/encoderfdkaac.cpp @@ -70,19 +70,23 @@ EncoderFdkAac::EncoderFdkAac(EncoderCallback* pCallback) libnames << "/opt/local/lib/libfdk-aac.1.dylib"; #endif + QString failedMsg = "Failed to load AAC encoder library"; for (const auto& libname : qAsConst(libnames)) { m_library = new QLibrary(libname); if (m_library->load()) { kLogger.debug() << "Successfully loaded encoder library " << m_library->fileName(); break; } else { - kLogger.warning() << "Failed to load " << libname << ", " << m_library->errorString(); + // collect error messages for the case we have no success + failedMsg.append("\n" + m_library->errorString()); } delete m_library; m_library = nullptr; } if (!m_library || !m_library->isLoaded()) { + kLogger.warning() << failedMsg; + ErrorDialogProperties* props = ErrorDialogHandler::instance()->newDialogProperties(); props->setType(DLG_WARNING); props->setTitle(QObject::tr("Encoder")); @@ -149,8 +153,6 @@ EncoderFdkAac::EncoderFdkAac(EncoderCallback* pCallback) ErrorDialogHandler::instance()->requestErrorDialog(props); return; } - - kLogger.debug() << "Loaded libfdk-aac"; } EncoderFdkAac::~EncoderFdkAac() { |