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 80b0ede7 by Henrik von Coler

Worked on doc for gain_example!

parent 5bdee2a7
......@@ -17,6 +17,7 @@ liblo/
wav/
*
*~
*.o
*html/
......
......@@ -3,11 +3,23 @@ gain_example {#mainpage}
# BRIEF
This example uses:
This example introduces the basic
libraries and tools used in the
Sound Synthesis class. It passes
audio from the inputs to the outputs,
allowing to set the gain using an OSC
interface.
-JACK
-YAML
-LIBLO
# Libraries
The following libraries are used within this project:
* jack
* YAML
* LIBLO
# OSC server config
The file 'config.yml' is read by
gain_example in order to set the port
and the OSC path used to set the gain.
\ No newline at end of file
......@@ -3,7 +3,7 @@ PROJECT_NAME = "Gain_Example"
PROJECT_BRIEF = "Simple gain manipulation through OSC!"
OUTPUT_DIRECTORY = "./"
INPUT = "../"
INPUT = "../" README.md
FILE_PATTERNS = *.cpp *.h
......@@ -16,4 +16,4 @@ EXTRACT_PRIVATE = YES
HAVE_DOT = YES
UML_LOOK = YES
USE_MOFILE_AS_MAINPAGE = README.md
USE_MOFILE_AS_MAINPAGE = README.md
\ No newline at end of file
......@@ -13,10 +13,7 @@
#include "oscman.h"
///
/// \brief OscMan::OscMan
/// \param yaml_manager
///
OscMan::OscMan(YamlMan *yaml_manager)
{
......@@ -47,15 +44,7 @@ OscMan::OscMan(YamlMan *yaml_manager)
}
///
////// \brief OscMan::gain_callback
////// \param path
////// \param types
////// \param argv
////// \param argc
////// \param data
////// \param user_data
////// \return
int OscMan::gain_callback(const char *path, const char *types, lo_arg ** argv,
int argc, void *data, void *user_data )
{
......@@ -70,10 +59,7 @@ int argc, void *data, void *user_data )
}
///
/// \brief OscMan::get_gain
/// \return
///
double OscMan::get_gain()
{
return gain;
......
......@@ -33,22 +33,42 @@ private:
/// the port to be opened
/// the IP port to be opened
int port;
///
lo::ServerThread *st;
/// The actual gain value
double gain;
///
////// \brief OscMan::gain_callback
////// \param path
////// \param types
////// \param argv
////// \param argc
////// \param data
////// \param user_data
////// \return
static int gain_callback(const char *path, const char *types, lo_arg ** argv,
int argc, void *data, void *user_data);
public:
///
/// \brief OscMan::OscMan
/// The constructor
/// \param yaml_manager
///
OscMan(YamlMan *yaml_manager);
///
/// \brief OscMan::get_gain
/// \return the gain value [double]
///
double get_gain();
......
......@@ -4,7 +4,8 @@
*
* \brief Class which parses YAML files for parameters.
*
*
* YamlMan also keeps the parameter settings and offers
* getters for each, individually.
*
* \author Henrik von Coler
*
......@@ -33,36 +34,33 @@ class YamlMan
private:
///
/// \brief port
/// The OSC port to be used for receiving messages
///
int port;
///
/// \brief path
/// The OSC path used for the parameter
///
std::string path;
public:
/// \brief YamlMan
/// Constructor
/// \param filepath The path of the config file (*.yml)
YamlMan(std::string filepath);
///
/// \brief return_port
/// \return
///
/// \return The OSC port to be used
int return_port();
///
/// \brief return_path
/// \return
/// Returns the OSC path used
/// to change the gain of the signal.
///
/// \return The OSC path.
string return_path();
};
#endif // YAMLMAN_H
......@@ -4,6 +4,14 @@ CC = g++
# path(s) to include files
CFLAGS = -I.
DEBUG ?= 1
ifeq ($(DEBUG), 1)
DBFLAGS = -g -Wall -Werror
else
DBFLAGS =
endif
# libraries to link
LDFLAGS = -ljack -llo -lsndfile
......@@ -16,7 +24,7 @@ all: wav_example
$(CC) -c -o $@ $< $(CFLAGS)
wav_example: wav_example.o oscman.o singlesample.o
$(CC) -o wav_example wav_example.o oscman.o singlesample.o $(LDFLAGS)
$(CC) $(DBFLAGS) -o wav_example wav_example.o oscman.o singlesample.o $(LDFLAGS)
clean:
......
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