View test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define TWEAKS | |
#ifdef TWEAKS | |
#define BOOST_ASIO_DISABLE_THREADS 1 | |
#endif | |
#include <boost/asio.hpp> | |
#include <boost/asio/experimental/awaitable_operators.hpp> | |
#include <boost/asio/experimental/channel.hpp> |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This makefile was handwritten by Seth Heeren | |
# Replicates 90% of http://www.multi.fi/~ghaga/mymakefile/ | |
###################################### | |
TARGET_NAME=mymakemaker | |
## Targets | |
########## | |
all: exe dynamic static objs | |
clean: |
View test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////////////////////////////////// | |
// 'mymakefile' is a tool for creating makefiles to be used with make | |
// | |
// Author: Greg Haga 2018 | |
// email: ggh@multi.fi | |
// | |
// Quick reimplementation in C++ by Seth Heeren, public domain | |
/////////////////////////////////////////////////////////////////////////////// | |
#include <unistd.h> // chdir | |
#include <experimental/filesystem> |
View test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define BOOST_SPIRIT_DEBUG | |
#include <boost/fusion/adapted/struct.hpp> | |
#include <boost/spirit/include/qi.hpp> | |
#include <boost/spirit/include/phoenix.hpp> | |
#include <iomanip> | |
#include <boost/iostreams/filtering_stream.hpp> | |
#include <boost/iostreams/filter/gzip.hpp> | |
#include <boost/utility/string_ref.hpp> | |
#include <boost/container/flat_set.hpp> | |
#include <fstream> |
View test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <boost/config.hpp> | |
#if ! defined BOOST_NO_CXX11_DECLTYPE | |
#define BOOST_RESULT_OF_USE_DECLTYPE | |
#endif | |
#define BOOST_THREAD_VERSION 4 | |
#define BOOST_THREAD_PROVIDES_EXECUTORS | |
#define BOOST_THREAD_USES_LOG_THREAD_ID | |
#define BOOST_THREAD_QUEUE_DEPRECATE_OLD |
View test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/interprocess/managed_shared_memory.hpp> | |
#include <boost/multi_index_container.hpp> | |
#include <boost/multi_index/member.hpp> | |
#include <boost/multi_index/ordered_index.hpp> | |
//#include <boost/multi_index/composite_key.hpp> | |
#include <iostream> | |
namespace bip = boost::interprocess; | |
namespace bmi = boost::multi_index; |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all:consumer producer | |
CPPFLAGS+=-std=c++03 -Wall -pedantic | |
CPPFLAGS+=-g -O0 | |
CPPFLAGS+=-isystem ~/custom/boost/ | |
LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib | |
LDFLAGS+=-lboost_system -lrt -lpthread | |
%:%.cpp |
View .gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.*.swp | |
.*.swo | |
test | |
*.o |
View CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ | |
-isystem /home/sehe/custom/boost \ | |
-std=c++11 \ | |
-g -O2 -pthread -march=native") | |
add_definitions("-DBOOST_SYSTEM_NO_LIB") | |
ADD_LIBRARY(a_a a.cpp) | |
ADD_LIBRARY(b_a b.cpp) | |
ADD_LIBRARY(c_a c.cpp) |
View clean_audio.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create background noise profile from mp3 | |
/usr/bin/sox noise.mp3 -n noiseprof noise.prof | |
# Remove noise from mp3 using profile | |
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21 | |
# Remove silence from mp3 | |
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5% | |
# Remove noise and silence in a single command |
NewerOlder