1
/******************************************************************************
2
* Copyright © 2012-2014 Institut für Nachrichtentechnik, Universität Rostock *
3
* Copyright © 2006-2012 Quality & Usability Lab, *
4
* Telekom Innovation Laboratories, TU Berlin *
6
* This file is part of the Audio Processing Framework (APF). *
8
* The APF is free software: you can redistribute it and/or modify it under *
9
* the terms of the GNU General Public License as published by the Free *
10
* Software Foundation, either version 3 of the License, or (at your option) *
11
* any later version. *
13
* The APF is distributed in the hope that it will be useful, but WITHOUT ANY *
14
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
15
* FOR A PARTICULAR PURPOSE. *
16
* See the GNU General Public License for more details. *
18
* You should have received a copy of the GNU General Public License along *
19
* with this program. If not, see <http://www.gnu.org/licenses/>. *
21
* http://AudioProcessingFramework.github.com *
22
******************************************************************************/
24
// Usage example for the MimoProcessor with JACK.
28
#include "apf/stringtools.h"
30
// First the policies ...
31
#include "apf/jack_policy.h"
32
#include "apf/posix_thread_policy.h"
33
// ... then the SimpleProcessor.
34
#include "simpleprocessor.h"
39
int main(int argc, char *argv[])
43
std::cerr << "Error: too few arguments!" << std::endl;
44
std::cout << "Usage: " << argv[0]
45
<< " inchannels inportprefix outchannels [outportprefix]" << std::endl;
50
e.set("name", "my_engine");
53
e.set("in_channels", argv[1]);
54
e.set("in_port_prefix", argv[2]);
55
e.set("out_channels", argv[3]);
56
if (argc > 4) e.set("out_port_prefix", argv[4]);
57
else e.set("out_port_prefix", "system:playback_");
59
SimpleProcessor engine(e);
63
SimpleProcessor::Input::Params p3;
64
p3.set("port_name", "another_port_just_for_fun");
70
// Settings for Vim (http://www.vim.org/), please do not remove:
71
// vim:softtabstop=2:shiftwidth=2:expandtab:textwidth=80:cindent