Audio Processing Framework (APF) version 0.5.0
jack_simpleprocessor.cpp
// Usage example for the MimoProcessor with JACK.
#include <iostream>
// First the policy ...
// ... then the SimpleProcessor.
#include "simpleprocessor.h"
int main(int argc, char *argv[])
{
if (argc < 4)
{
std::cerr << "Error: too few arguments!" << std::endl;
std::cout << "Usage: " << argv[0]
<< " inchannels inportprefix outchannels [outportprefix]" << std::endl;
return 42;
}
e.set("name", "my_engine");
e.set("threads", 2);
e.set("in_channels", argv[1]);
e.set("in_port_prefix", argv[2]);
e.set("out_channels", argv[3]);
if (argc > 4) e.set("out_port_prefix", argv[4]);
else e.set("out_port_prefix", "system:playback_");
SimpleProcessor engine(e);
std::this_thread::sleep_for(std::chrono::seconds(2));
SimpleProcessor::Input::Params p3;
p3.set("port_name", "another_port_just_for_fun");
engine.add(p3);
std::this_thread::sleep_for(std::chrono::seconds(60));
}
JACK policy for MimoProcessor's interface_policy.
bool S2A(const std::string &input, out_T &output)
Converter "String to Anything".
Definition: stringtools.h:122
std::string A2S(const T &input)
Converter "Anything to String".
Definition: stringtools.h:52
Helper functions for string conversion.
A "dictionary" for parameters.
Definition: parameter_map.h:68
const std::string & set(const std::string &k, const T &v)
Set value.