This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de (internal network only) to import your old projects to the new GitLab platform 📥

Commit e62ce144 by Henrik von Coler

Gain example now with main file!

parent 80b0ede7
......@@ -7,7 +7,7 @@ CFLAGS = -I.
# libraries to link
LDFLAGS = -ljack -llo -lyaml-cpp
SRCS = gain_example.cpp oscman.cpp yamlman.cpp
SRCS = main.cpp gain_example.cpp oscman.cpp yamlman.cpp
DEPS = oscman.h gain_example.h yamlman.h
all: gain_example
......@@ -15,8 +15,8 @@ all: gain_example
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
gain_example: gain_example.o oscman.o yamlman.o
$(CC) -o gain_example gain_example.o oscman.o yamlman.o $(LDFLAGS)
gain_example: main.o gain_example.o oscman.o yamlman.o
$(CC) -o gain_example main.o gain_example.o oscman.o yamlman.o $(LDFLAGS)
clean:
......
/**
* \file GainExample.cpp
* \file gain_example.cpp
* \class GainExample
*
* \brief Simple example, passing the input to the output
......@@ -20,6 +20,7 @@ using std::endl;
GainExample::GainExample(YamlMan *yaml_manager){
/// @todo Add examples for the TODO list.
// creating an OSC manager instance
oscman = new OscMan(yaml_manager);
......@@ -108,36 +109,3 @@ int GainExample::callback_process(jack_nframes_t x, void* object)
return static_cast<GainExample*>(object)->process(x);
}
int main(int argc, char *argv[]){
if (argc < 3)
cout << "Need config file to start!" << endl;
else{
// process command line arguments
std::string configfile;
for (int i = 1; i < argc; i++)
{
if (i + 1 != argc)
{
if (strcmp(argv[i], "-c") == 0)
{
configfile = argv[i + 1];
i++;
}
}
}
YamlMan *yaml_manager = new YamlMan(configfile);
/// initial ports from constructor created here.
GainExample *t = new GainExample(yaml_manager);
}
}
/**
* \file GainExample.h
* \file gain_example.h
* \class GainExample
*
* \brief Simple example, passing the input to the output
......
/**
* \file main.cpp
*
* \brief Just the main file ...
*
* \author Henrik von Coler
*
* \date $Date: 2019/04/15 $
*
*/
#include"yamlman.h"
#include"oscman.h"
#include"gain_example.h"
#include<iostream>
#include<stdlib.h>
#include<unistd.h>
using std::cout;
using std::endl;
int main(int argc, char *argv[]){
if (argc < 3)
cout << "Need config file to start!" << endl;
else{
// process command line arguments
std::string configfile;
for (int i = 1; i < argc; i++)
{
if (i + 1 != argc)
{
if (strcmp(argv[i], "-c") == 0)
{
configfile = argv[i + 1];
i++;
}
}
}
YamlMan *yaml_manager = new YamlMan(configfile);
/// initial ports from constructor created here.
GainExample *t = new GainExample(yaml_manager);
}
}
/**
* \file yamlman.cpp
* \class YamlMan
*
* \author Henrik von Coler
*
* \version $Revision: 0.5 $
*
* \date $Date: 2016/08/18$
*
*/
#include "yamlman.h"
YamlMan::YamlMan(std::string filepath)
......
/**
* \file yamlman.h
* \class YamlMan
*
*
* \brief Class which parses YAML files for parameters.
*
* YamlMan also keeps the parameter settings and offers
......@@ -13,9 +13,6 @@
*
* \date $Date: 2016/08/18$
*
* Contact: von_coler@tu-berlin.de
*
*
*/
#ifndef YAMLMAN_H
......
#!/bin/sh
#
#
echo Hello World!
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment