added test data for time domain

This commit is contained in:
2026-02-22 14:09:45 +03:00
parent e0e96df902
commit 3c62b7755d
2 changed files with 5 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ auto main() -> int
// данных для чтения m_block_size; см. установки по умолчанию. // данных для чтения m_block_size; см. установки по умолчанию.
// Передается по ссылке и заполняется необходимыми данными // Передается по ссылке и заполняется необходимыми данными
hr::setup setup; hr::setup setup;
setup.m_domain = hr::DOMAIN_PLUGIN::FREQUENSY; // setup.m_domain = hr::DOMAIN_PLUGIN::FREQUENSY;
setup.m_file = "./sin.wav"; setup.m_file = "./sin.wav";
auto r = hr::run<hr::plugins::magnitude>(setup); auto r = hr::run<hr::plugins::magnitude>(setup);

View File

@@ -8,6 +8,10 @@ namespace hr::plugins
void magnitude::process(fvec_t& base, real_time timestamp) void magnitude::process(fvec_t& base, real_time timestamp)
{ {
result::bit b;
b.m_value = base;
b.m_duration = timestamp;
m_result.set_bit(b);
} }
void magnitude::process(cvec_t& fft, fvec_t& base, real_time timestamp) void magnitude::process(cvec_t& fft, fvec_t& base, real_time timestamp)