Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 98a22250 authored by MONSEIGNE Thibaut's avatar MONSEIGNE Thibaut

Reapply modif

parent 0211891c
......@@ -2,12 +2,9 @@
#include <cmath> // Floor
#include <sstream>
using namespace OpenViBE;
using namespace /*OpenViBE::*/Kernel;
using namespace /*OpenViBE::*/Plugins;
using namespace Artifact;
using namespace std;
namespace OpenViBE {
namespace Plugins {
namespace Artifact {
//---------------------------------------------------------------------------------------------------
bool CBoxAlgorithmArtifactAmplitude::initialize()
{
......@@ -19,7 +16,7 @@ bool CBoxAlgorithmArtifactAmplitude::initialize()
m_max = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 0);
//***** Assert *****
OV_ERROR_UNLESS_KRF(m_max > 0, "Invalid Maximum [" << m_max << "] (expected value > 0)\n", ErrorType::BadSetting);
OV_ERROR_UNLESS_KRF(m_max > 0, "Invalid Maximum [" << m_max << "] (expected value > 0)\n", Kernel::ErrorType::BadSetting);
return true;
}
......@@ -29,11 +26,11 @@ bool CBoxAlgorithmArtifactAmplitude::initialize()
bool CBoxAlgorithmArtifactAmplitude::uninitialize()
{
m_decoder.uninitialize();
stringstream ss;
std::stringstream ss;
ss << m_nArtifact << " artifacts detected in " << m_nSamples << " samples (";
ss.precision(2);
ss << fixed << 100.0 * double(m_nArtifact) / double(m_nSamples) << "%)" << endl;
this->getLogManager() << LogLevel_Info << ss.str();
ss << std::fixed << 100.0 * double(m_nArtifact) / double(m_nSamples) << "%)" << std::endl;
this->getLogManager() << Kernel::LogLevel_Info << ss.str();
return true;
}
//---------------------------------------------------------------------------------------------------
......@@ -50,12 +47,12 @@ bool CBoxAlgorithmArtifactAmplitude::processInput(const size_t /*index*/)
//---------------------------------------------------------------------------------------------------
bool CBoxAlgorithmArtifactAmplitude::process()
{
IBoxIO& boxContext = this->getDynamicBoxContext();
Kernel::IBoxIO& boxContext = this->getDynamicBoxContext();
for (size_t i = 0; i < boxContext.getInputChunkCount(0); ++i)
{
bool artifact = false;
m_decoder.decode(i); // Decode chunk
OV_ERROR_UNLESS_KRF(m_iMatrix->getDimensionCount() == 2, "Invalid Input Signal", ErrorType::BadInput);
OV_ERROR_UNLESS_KRF(m_iMatrix->getDimensionCount() == 2, "Invalid Input Signal", Kernel::ErrorType::BadInput);
m_nSamples++;
//if (m_decoder.isHeaderReceived()) {} // Header
if (m_decoder.isBufferReceived()) // Buffer
......@@ -66,7 +63,7 @@ bool CBoxAlgorithmArtifactAmplitude::process()
{
if (abs(iBuffer[idx]) >= m_max) // Amplitude comparison
{
this->getLogManager() << LogLevel_Trace << "Artifact detected in channel (" << floor(idx / m_iMatrix->getDimensionSize(1)) << ")\n";
this->getLogManager() << Kernel::LogLevel_Trace << "Artifact detected in channel (" << floor(idx / m_iMatrix->getDimensionSize(1)) << ")\n";
artifact = true;
m_nArtifact++;
break;
......@@ -89,3 +86,7 @@ bool CBoxAlgorithmArtifactAmplitude::process()
return true;
}
//---------------------------------------------------------------------------------------------------
} // namespace Artifact
} // namespace Plugins
} // namespace OpenViBE
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment