added raw data plugin
This commit is contained in:
@@ -16,7 +16,8 @@ namespace hr::plugins
|
||||
result::bit b;
|
||||
b.m_value = base;
|
||||
b.m_duration = timestamp;
|
||||
m_result.set_bit(b);
|
||||
m_tmp.set_bit(b);
|
||||
m_size += base.size();
|
||||
}
|
||||
|
||||
void raw_data::process(cvec_t& fft, fvec_t& base, real_time timestamp)
|
||||
@@ -25,6 +26,24 @@ namespace hr::plugins
|
||||
|
||||
result raw_data::get_result()
|
||||
{
|
||||
if (m_tmp.m_data.empty())
|
||||
return m_result;
|
||||
|
||||
m_result.m_data.reserve(m_size);
|
||||
|
||||
std::size_t index = 0;
|
||||
for (auto& t : m_tmp.m_data)
|
||||
{
|
||||
hack::log()(t.m_value.size());
|
||||
for (auto s : t.m_value)
|
||||
{
|
||||
result::bit b;
|
||||
b.m_value.push_back(s);
|
||||
b.m_duration = t.m_duration;
|
||||
m_result.set_bit(b);
|
||||
}
|
||||
}
|
||||
|
||||
return m_result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user