From 179edcfc19051be0423f76cd394ff2f43827a8d3 Mon Sep 17 00:00:00 2001 From: Alexander Diamadis Date: Sun, 20 Feb 2022 12:21:21 +0100 Subject: [PATCH] fixed #3 --- source/csong.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/source/csong.cpp b/source/csong.cpp index 3349ceb..f931eb5 100644 --- a/source/csong.cpp +++ b/source/csong.cpp @@ -85,7 +85,6 @@ void csong::analyze(float preferedLoudness) m_loudness=loudness[0]; m_widgetItem[1].setData(Qt::EditRole,QVariant(m_loudness)); - m_peakLevel=0; for (unsigned int i=0;isamples.size();i++){ if (abs(fileData->samples[i])>m_peakLevel){ @@ -110,19 +109,27 @@ void csong::analyze(float preferedLoudness) } } catch (const UnsupportedExtensionEx & e) { - std::cerr << "Caught: " << e.what() << std::endl; + //std::cerr << "Caught: " << e.what() << std::endl; + m_widgetItem[1].setText("Nicht unterstützte Dateiendung!"); + m_widgetItem[2].setText("-"); + m_widgetItem[3].setText("-"); + m_widgetItem[4].setText("-"); } catch (const LoadPathNotImplEx & e) { - std::cerr << "Caught: " << e.what() << std::endl; + //std::cerr << "Caught: " << e.what() << std::endl; } catch (const LoadBufferNotImplEx & e) { - std::cerr << "Caught: " << e.what() << std::endl; + //std::cerr << "Caught: " << e.what() << std::endl; } catch (const std::exception & e) { - std::cerr << "Caught: " << e.what() << std::endl; + //std::cerr << "Caught: " << e.what() << std::endl; + m_widgetItem[1].setText("Nicht unterstützter Codec!"); + m_widgetItem[2].setText("-"); + m_widgetItem[3].setText("-"); + m_widgetItem[4].setText("-"); } }