initial commit
This commit is contained in:
23
bin/main.cpp
Normal file
23
bin/main.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <hack/logger/logger.hpp>
|
||||
#include "harmonica.hpp"
|
||||
|
||||
auto main() -> int
|
||||
{
|
||||
// setup создается для каждого файла свой
|
||||
// т.к. при чтении данных из файла уже должен быть определен размер блока
|
||||
// данных для чтения m_block_size; см. установки по умолчанию.
|
||||
// Передается по ссылке и заполняется необходимыми данными
|
||||
hr::setup setup;
|
||||
setup.m_domain = hr::DOMAIN_PLUGIN::FREQUENSY;
|
||||
setup.m_file = hr::var::SOUND;
|
||||
|
||||
auto r = hr::run<hr::plugins::magnitude>(setup);
|
||||
hack::log()("size:", r.m_data.size());
|
||||
|
||||
if (!r.empty())
|
||||
{
|
||||
std::vector<float> s;
|
||||
for (auto p : r.m_data) s.push_back(p.m_value[0]);
|
||||
// hack::log()(s);
|
||||
}
|
||||
}
|
||||
8
bin/meson.build
Normal file
8
bin/meson.build
Normal file
@@ -0,0 +1,8 @@
|
||||
executable(
|
||||
meson.project_name(),
|
||||
'main.cpp',
|
||||
dependencies : deps,
|
||||
cpp_args: args,
|
||||
include_directories : inc
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user