Mentions légales du service

Skip to content
Snippets Groups Projects

Resolve "Update: Data Generation Clang Diagnostique"

9 files
+ 86
69
Compare changes
  • Side-by-side
  • Inline
Files
9
/*
/*
* Generates a channel units stream with user-specified unit and factor
* Generates a channel units stream with user-specified unit and factor
*/
*/
#include "ovpCBoxAlgorithmChannelUnitsGenerator.h"
#include "CBoxAlgorithmChannelUnitsGenerator.hpp"
namespace OpenViBE {
namespace OpenViBE {
namespace Plugins {
namespace Plugins {
@@ -36,15 +36,13 @@ bool CChannelUnitsGenerator::process()
@@ -36,15 +36,13 @@ bool CChannelUnitsGenerator::process()
{
{
Kernel::IBoxIO* boxContext = getBoxAlgorithmContext()->getDynamicBoxContext();
Kernel::IBoxIO* boxContext = getBoxAlgorithmContext()->getDynamicBoxContext();
if (!m_headerSent)
if (!m_headerSent) {
{
CMatrix* units = m_encoder.getInputMatrix();
CMatrix* units = m_encoder.getInputMatrix();
units->resize(m_nChannel, 2);
units->resize(m_nChannel, 2);
units->setDimensionLabel(1, 0, "Unit");
units->setDimensionLabel(1, 0, "Unit");
units->setDimensionLabel(1, 1, "Factor");
units->setDimensionLabel(1, 1, "Factor");
for (size_t i = 0; i < m_nChannel; ++i)
for (size_t i = 0; i < m_nChannel; ++i) {
{
units->getBuffer()[i * 2 + 0] = double(m_unit);
units->getBuffer()[i * 2 + 0] = double(m_unit);
units->getBuffer()[i * 2 + 1] = double(m_factor);
units->getBuffer()[i * 2 + 1] = double(m_factor);
units->setDimensionLabel(0, i, ("Channel " + std::to_string(i + 1)).c_str());
units->setDimensionLabel(0, i, ("Channel " + std::to_string(i + 1)).c_str());
Loading