aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-11-18 08:06:06 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-12-03 08:45:48 +0100
commited31a26ebabcd28678aff679093b6e6fba55b67f (patch)
treef263c6c7c6bc6d86f62fa921f6f34d915e2904c3
parent1650cc5ad2eba4fb8857ffc920170ae0f9f1a18d (diff)
Restructure: Move sample from common code to 'libsample'
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/amps/Makefile.am1
-rw-r--r--src/amps/amps.c2
-rw-r--r--src/amps/amps_tacs_main.c2
-rw-r--r--src/amps/dsp.c2
-rw-r--r--src/amps/frame.c2
-rw-r--r--src/amps/sysinfo.c2
-rw-r--r--src/amps/transaction.c2
-rw-r--r--src/anetz/Makefile.am1
-rw-r--r--src/anetz/anetz.c2
-rw-r--r--src/anetz/dsp.c2
-rw-r--r--src/anetz/main.c2
-rw-r--r--src/bnetz/Makefile.am1
-rw-r--r--src/bnetz/bnetz.c2
-rw-r--r--src/bnetz/dsp.c2
-rw-r--r--src/bnetz/main.c2
-rw-r--r--src/cnetz/Makefile.am1
-rw-r--r--src/cnetz/cnetz.c2
-rw-r--r--src/cnetz/database.c2
-rw-r--r--src/cnetz/dsp.c2
-rw-r--r--src/cnetz/fsk_demod.c2
-rw-r--r--src/cnetz/main.c2
-rw-r--r--src/cnetz/telegramm.c2
-rw-r--r--src/cnetz/transaction.c2
-rw-r--r--src/common/Makefile.am1
-rw-r--r--src/common/call.c2
-rw-r--r--src/common/debug.c2
-rw-r--r--src/common/display_measurements.c2
-rw-r--r--src/common/display_status.c2
-rw-r--r--src/common/display_wave.c2
-rw-r--r--src/common/main_mobile.c2
-rw-r--r--src/common/sender.c2
-rw-r--r--src/jtacs/Makefile.am1
-rw-r--r--src/libcompandor/compandor.c2
-rw-r--r--src/libdtmf/dtmf_encode.c2
-rw-r--r--src/libemphasis/emphasis.c2
-rw-r--r--src/libfilter/iir_filter.c2
-rw-r--r--src/libfm/fm.c2
-rw-r--r--src/libfsk/fsk.c2
-rw-r--r--src/libgoertzel/goertzel.c2
-rw-r--r--src/libjitter/jitter.c2
-rw-r--r--src/libmncc/mncc_console.c2
-rw-r--r--src/libmncc/mncc_cross.c2
-rw-r--r--src/libmncc/mncc_sock.c2
-rw-r--r--src/libsample/Makefile.am6
-rw-r--r--src/libsample/sample.c (renamed from src/common/sample.c)0
-rw-r--r--src/libsample/sample.h (renamed from src/common/sample.h)0
-rw-r--r--src/libsamplerate/samplerate.c2
-rw-r--r--src/libscrambler/scrambler.c2
-rw-r--r--src/libsdr/display_iq.c2
-rw-r--r--src/libsdr/display_spectrum.c2
-rw-r--r--src/libsdr/sdr.c2
-rw-r--r--src/libsdr/sdr_config.c2
-rw-r--r--src/libsound/sound_alsa.c2
-rw-r--r--src/libwave/wave.c2
-rw-r--r--src/nmt/Makefile.am1
-rw-r--r--src/nmt/dms.c2
-rw-r--r--src/nmt/dsp.c2
-rw-r--r--src/nmt/frame.c2
-rw-r--r--src/nmt/main.c2
-rw-r--r--src/nmt/nmt.c2
-rw-r--r--src/nmt/sms.c2
-rw-r--r--src/nmt/transaction.c2
-rw-r--r--src/r2000/Makefile.am1
-rw-r--r--src/r2000/dsp.c2
-rw-r--r--src/r2000/main.c2
-rw-r--r--src/r2000/r2000.c2
-rw-r--r--src/tacs/Makefile.am1
-rw-r--r--src/test/Makefile.am4
-rw-r--r--src/test/test_compandor.c2
-rw-r--r--src/test/test_dms.c2
-rw-r--r--src/test/test_emphasis.c2
-rw-r--r--src/test/test_filter.c2
-rw-r--r--src/test/test_performance.c2
-rw-r--r--src/test/test_sms.c2
-rw-r--r--src/tv/Makefile.am1
-rw-r--r--src/tv/bas.c2
-rw-r--r--src/tv/fubk.c2
-rw-r--r--src/tv/image.c2
-rw-r--r--src/tv/main.c2
-rw-r--r--src/tv/tv_modulate.c2
-rw-r--r--src/tv/vcr.c2
84 files changed, 89 insertions, 68 deletions
diff --git a/.gitignore b/.gitignore
index 88eaa4f..1ddc793 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,6 +39,7 @@ src/libfft/libfft.a
src/libmncc/libmncc.a
src/libsound/libsound.a
src/libsdr/libsdr.a
+src/libsample/libsample.a
src/common/libcommon.a
src/common/libmobile.a
src/anetz/libgermanton.a
diff --git a/configure.ac b/configure.ac
index 515a874..2cd920b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,6 +94,7 @@ AC_OUTPUT(
src/libmncc/Makefile
src/libsound/Makefile
src/libsdr/Makefile
+ src/libsample/Makefile
src/common/Makefile
src/anetz/Makefile
src/bnetz/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 17f4565..ff58c84 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = \
+ libsample \
libimage \
libcompandor \
libgoertzel \
diff --git a/src/amps/Makefile.am b/src/amps/Makefile.am
index 1f384d5..88da1cb 100644
--- a/src/amps/Makefile.am
+++ b/src/amps/Makefile.am
@@ -38,6 +38,7 @@ amps_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/amps/amps.c b/src/amps/amps.c
index a103b02..de9cac2 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -42,7 +42,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmncc/cause.h"
diff --git a/src/amps/amps_tacs_main.c b/src/amps/amps_tacs_main.c
index 4d3a77d..dbb9973 100644
--- a/src/amps/amps_tacs_main.c
+++ b/src/amps/amps_tacs_main.c
@@ -22,7 +22,7 @@
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../common/debug.h"
#include "../common/call.h"
diff --git a/src/amps/dsp.c b/src/amps/dsp.c
index 479daea..ae71432 100644
--- a/src/amps/dsp.c
+++ b/src/amps/dsp.c
@@ -81,7 +81,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "amps.h"
diff --git a/src/amps/frame.c b/src/amps/frame.c
index efaf4cf..52ee863 100644
--- a/src/amps/frame.c
+++ b/src/amps/frame.c
@@ -26,7 +26,7 @@
#include <errno.h>
#include <math.h>
#include <inttypes.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "amps.h"
#include "dsp.h"
diff --git a/src/amps/sysinfo.c b/src/amps/sysinfo.c
index 767ea13..974f35e 100644
--- a/src/amps/sysinfo.c
+++ b/src/amps/sysinfo.c
@@ -3,7 +3,7 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "amps.h"
#include "frame.h"
#include "main.h"
diff --git a/src/amps/transaction.c b/src/amps/transaction.c
index d3d0781..edad0a3 100644
--- a/src/amps/transaction.c
+++ b/src/amps/transaction.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmncc/cause.h"
diff --git a/src/anetz/Makefile.am b/src/anetz/Makefile.am
index 9ff905e..fb92754 100644
--- a/src/anetz/Makefile.am
+++ b/src/anetz/Makefile.am
@@ -30,6 +30,7 @@ anetz_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index 109c053..077d673 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libtimer/timer.h"
#include "../common/call.h"
diff --git a/src/anetz/dsp.c b/src/anetz/dsp.c
index bb08bdc..ec971fc 100644
--- a/src/anetz/dsp.c
+++ b/src/anetz/dsp.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libtimer/timer.h"
#include "../common/call.h"
diff --git a/src/anetz/main.c b/src/anetz/main.c
index d698245..382ccc4 100644
--- a/src/anetz/main.c
+++ b/src/anetz/main.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../common/debug.h"
#include "../libtimer/timer.h"
diff --git a/src/bnetz/Makefile.am b/src/bnetz/Makefile.am
index 922e8fb..5a98339 100644
--- a/src/bnetz/Makefile.am
+++ b/src/bnetz/Makefile.am
@@ -26,6 +26,7 @@ bnetz_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index 1d3d608..cd78db0 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmncc/cause.h"
diff --git a/src/bnetz/dsp.c b/src/bnetz/dsp.c
index e61972d..01326ef 100644
--- a/src/bnetz/dsp.c
+++ b/src/bnetz/dsp.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "bnetz.h"
diff --git a/src/bnetz/main.c b/src/bnetz/main.c
index 9b48f98..014165b 100644
--- a/src/bnetz/main.c
+++ b/src/bnetz/main.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../common/main_mobile.h"
diff --git a/src/cnetz/Makefile.am b/src/cnetz/Makefile.am
index 95b83d4..6c1164e 100644
--- a/src/cnetz/Makefile.am
+++ b/src/cnetz/Makefile.am
@@ -29,6 +29,7 @@ cnetz_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/cnetz/cnetz.c b/src/cnetz/cnetz.c
index d708827..d8a9ccf 100644
--- a/src/cnetz/cnetz.c
+++ b/src/cnetz/cnetz.c
@@ -142,7 +142,7 @@
#include <errno.h>
#include <math.h>
#include <inttypes.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmncc/cause.h"
diff --git a/src/cnetz/database.c b/src/cnetz/database.c
index c8d6b64..b7465e9 100644
--- a/src/cnetz/database.c
+++ b/src/cnetz/database.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "cnetz.h"
#include "database.h"
diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c
index 07a5117..cba0de9 100644
--- a/src/cnetz/dsp.c
+++ b/src/cnetz/dsp.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <math.h>
#include <errno.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "cnetz.h"
diff --git a/src/cnetz/fsk_demod.c b/src/cnetz/fsk_demod.c
index 8733930..2f0ae96 100644
--- a/src/cnetz/fsk_demod.c
+++ b/src/cnetz/fsk_demod.c
@@ -128,7 +128,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "cnetz.h"
#include "dsp.h"
diff --git a/src/cnetz/main.c b/src/cnetz/main.c
index 0a458de..3285fee 100644
--- a/src/cnetz/main.c
+++ b/src/cnetz/main.c
@@ -22,7 +22,7 @@
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../common/debug.h"
#include "../common/call.h"
diff --git a/src/cnetz/telegramm.c b/src/cnetz/telegramm.c
index 48c0e83..5e67622 100644
--- a/src/cnetz/telegramm.c
+++ b/src/cnetz/telegramm.c
@@ -26,7 +26,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "cnetz.h"
#include "dsp.h"
diff --git a/src/cnetz/transaction.c b/src/cnetz/transaction.c
index 1c30c54..724fe9e 100644
--- a/src/cnetz/transaction.c
+++ b/src/cnetz/transaction.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmncc/cause.h"
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 9abad04..8380053 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -3,7 +3,6 @@ AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
noinst_LIBRARIES = libcommon.a libmobile.a
libcommon_a_SOURCES = \
- sample.c \
debug.c \
display_wave.c \
display_measurements.c
diff --git a/src/common/call.c b/src/common/call.c
index 87a6683..85c0e9f 100644
--- a/src/common/call.c
+++ b/src/common/call.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <errno.h>
#include <sys/time.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "debug.h"
#include "sender.h"
#include "call.h"
diff --git a/src/common/debug.c b/src/common/debug.c
index f03a6d3..4b41a3e 100644
--- a/src/common/debug.c
+++ b/src/common/debug.c
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <errno.h>
#include <math.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "debug.h"
#include "display.h"
#include "../libmncc/mncc_console.h"
diff --git a/src/common/display_measurements.c b/src/common/display_measurements.c
index 028224a..07ee5a7 100644
--- a/src/common/display_measurements.c
+++ b/src/common/display_measurements.c
@@ -24,7 +24,7 @@
#include <pthread.h>
#include <sys/ioctl.h>
#include <math.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "sender.h"
#define MAX_NAME_LEN 16
diff --git a/src/common/display_status.c b/src/common/display_status.c
index 66ff9ac..961f294 100644
--- a/src/common/display_status.c
+++ b/src/common/display_status.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <pthread.h>
#include <sys/ioctl.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "sender.h"
static int status_on = 0;
diff --git a/src/common/display_wave.c b/src/common/display_wave.c
index 1d729b2..b88080b 100644
--- a/src/common/display_wave.c
+++ b/src/common/display_wave.c
@@ -23,7 +23,7 @@
#include <pthread.h>
#include <math.h>
#include <sys/ioctl.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "sender.h"
#define HEIGHT 11
diff --git a/src/common/main_mobile.c b/src/common/main_mobile.c
index b4f9343..bb83cf8 100644
--- a/src/common/main_mobile.c
+++ b/src/common/main_mobile.c
@@ -29,7 +29,7 @@
#include <termios.h>
#include <errno.h>
#include <getopt.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "main_mobile.h"
#include "debug.h"
#include "sender.h"
diff --git a/src/common/sender.c b/src/common/sender.c
index bd4baff..ff14e93 100644
--- a/src/common/sender.c
+++ b/src/common/sender.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#include "sample.h"
+#include "../libsample/sample.h"
#include "debug.h"
#include "sender.h"
#include "../libtimer/timer.h"
diff --git a/src/jtacs/Makefile.am b/src/jtacs/Makefile.am
index c6a231e..a920e03 100644
--- a/src/jtacs/Makefile.am
+++ b/src/jtacs/Makefile.am
@@ -24,6 +24,7 @@ jtacs_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/libcompandor/compandor.c b/src/libcompandor/compandor.c
index c2a326c..3a2ca9b 100644
--- a/src/libcompandor/compandor.c
+++ b/src/libcompandor/compandor.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "compandor.h"
//#define db2level(db) pow(10, (double)db / 20.0)
diff --git a/src/libdtmf/dtmf_encode.c b/src/libdtmf/dtmf_encode.c
index 6413954..53bd1b6 100644
--- a/src/libdtmf/dtmf_encode.c
+++ b/src/libdtmf/dtmf_encode.c
@@ -20,7 +20,7 @@
#include <stdint.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "dtmf_encode.h"
#define PI M_PI
diff --git a/src/libemphasis/emphasis.c b/src/libemphasis/emphasis.c
index e4ee95b..7a43198 100644
--- a/src/libemphasis/emphasis.c
+++ b/src/libemphasis/emphasis.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libfilter/iir_filter.h"
#include "emphasis.h"
diff --git a/src/libfilter/iir_filter.c b/src/libfilter/iir_filter.c
index 2f6bb1d..50dabfd 100644
--- a/src/libfilter/iir_filter.c
+++ b/src/libfilter/iir_filter.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "iir_filter.h"
#define PI M_PI
diff --git a/src/libfm/fm.c b/src/libfm/fm.c
index 0e47d8a..e633f33 100644
--- a/src/libfm/fm.c
+++ b/src/libfm/fm.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "fm.h"
//#define FAST_SINE
diff --git a/src/libfsk/fsk.c b/src/libfsk/fsk.c
index fecd3bf..abdc147 100644
--- a/src/libfsk/fsk.c
+++ b/src/libfsk/fsk.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "fsk.h"
diff --git a/src/libgoertzel/goertzel.c b/src/libgoertzel/goertzel.c
index 7c926fb..e99c697 100644
--- a/src/libgoertzel/goertzel.c
+++ b/src/libgoertzel/goertzel.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "goertzel.h"
diff --git a/src/libjitter/jitter.c b/src/libjitter/jitter.c
index 5400971..b1922fc 100644
--- a/src/libjitter/jitter.c
+++ b/src/libjitter/jitter.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "jitter.h"
diff --git a/src/libmncc/mncc_console.c b/src/libmncc/mncc_console.c
index ac356c3..5bfbc9f 100644
--- a/src/libmncc/mncc_console.c
+++ b/src/libmncc/mncc_console.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <errno.h>
#include <sys/time.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libsamplerate/samplerate.h"
#include "../libjitter/jitter.h"
#include "../common/debug.h"
diff --git a/src/libmncc/mncc_cross.c b/src/libmncc/mncc_cross.c
index ea2c04f..9609d78 100644
--- a/src/libmncc/mncc_cross.c
+++ b/src/libmncc/mncc_cross.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "cause.h"
diff --git a/src/libmncc/mncc_sock.c b/src/libmncc/mncc_sock.c
index 33c2732..7f90b11 100644
--- a/src/libmncc/mncc_sock.c
+++ b/src/libmncc/mncc_sock.c
@@ -26,7 +26,7 @@
#include <sys/un.h>
#include <stddef.h>
#include <unistd.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "cause.h"
diff --git a/src/libsample/Makefile.am b/src/libsample/Makefile.am
new file mode 100644
index 0000000..5ae865c
--- /dev/null
+++ b/src/libsample/Makefile.am
@@ -0,0 +1,6 @@
+AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+
+noinst_LIBRARIES = libsample.a
+
+libsample_a_SOURCES = \
+ sample.c
diff --git a/src/common/sample.c b/src/libsample/sample.c
index 72ba941..72ba941 100644
--- a/src/common/sample.c
+++ b/src/libsample/sample.c
diff --git a/src/common/sample.h b/src/libsample/sample.h
index 01a17df..01a17df 100644
--- a/src/common/sample.h
+++ b/src/libsample/sample.h
diff --git a/src/libsamplerate/samplerate.c b/src/libsamplerate/samplerate.c
index fd2fea9..1ad6904 100644
--- a/src/libsamplerate/samplerate.c
+++ b/src/libsamplerate/samplerate.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "samplerate.h"
int init_samplerate(samplerate_t *state, double low_samplerate, double high_samplerate, double filter_cutoff)
diff --git a/src/libscrambler/scrambler.c b/src/libscrambler/scrambler.c
index ad57b08..6dd86a4 100644
--- a/src/libscrambler/scrambler.c
+++ b/src/libscrambler/scrambler.c
@@ -19,7 +19,7 @@
#include <stdint.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "scrambler.h"
#define PI M_PI
diff --git a/src/libsdr/display_iq.c b/src/libsdr/display_iq.c
index 350d076..dfe64ec 100644
--- a/src/libsdr/display_iq.c
+++ b/src/libsdr/display_iq.c
@@ -23,7 +23,7 @@
#include <math.h>
#include <pthread.h>
#include <stdlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/sender.h"
/* must be odd value! */
diff --git a/src/libsdr/display_spectrum.c b/src/libsdr/display_spectrum.c
index 6c60237..a7f6150 100644
--- a/src/libsdr/display_spectrum.c
+++ b/src/libsdr/display_spectrum.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/sender.h"
#include "../libfft/fft.h"
diff --git a/src/libsdr/sdr.c b/src/libsdr/sdr.c
index 69e07c1..f56b2b7 100644
--- a/src/libsdr/sdr.c
+++ b/src/libsdr/sdr.c
@@ -29,7 +29,7 @@ enum paging_signal;
#define __USE_GNU
#include <pthread.h>
#include <unistd.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libfm/fm.h"
#include "../libtimer/timer.h"
#include "../common/sender.h"
diff --git a/src/libsdr/sdr_config.c b/src/libsdr/sdr_config.c
index 0ab24bf..078e179 100644
--- a/src/libsdr/sdr_config.c
+++ b/src/libsdr/sdr_config.c
@@ -24,7 +24,7 @@ enum paging_signal;
#include <string.h>
#include <stdint.h>
#include <getopt.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "sdr.h"
#include "sdr_config.h"
diff --git a/src/libsound/sound_alsa.c b/src/libsound/sound_alsa.c
index a0fe878..b3ab8b8 100644
--- a/src/libsound/sound_alsa.c
+++ b/src/libsound/sound_alsa.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <math.h>
#include <alsa/asoundlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/sender.h"
diff --git a/src/libwave/wave.c b/src/libwave/wave.c
index a358068..86afc10 100644
--- a/src/libwave/wave.c
+++ b/src/libwave/wave.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <unistd.h>
#include <pthread.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "wave.h"
/* NOTE: No locking required for writing and reading buffer pointers, since 'int' is atomic on >=32 bit machines */
diff --git a/src/nmt/Makefile.am b/src/nmt/Makefile.am
index 2c425ad..8e9bbcf 100644
--- a/src/nmt/Makefile.am
+++ b/src/nmt/Makefile.am
@@ -38,6 +38,7 @@ nmt_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/nmt/dms.c b/src/nmt/dms.c
index 6fc0c5c..f71ddf7 100644
--- a/src/nmt/dms.c
+++ b/src/nmt/dms.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "nmt.h"
diff --git a/src/nmt/dsp.c b/src/nmt/dsp.c
index 8f58352..d706860 100644
--- a/src/nmt/dsp.c
+++ b/src/nmt/dsp.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "nmt.h"
#include "transaction.h"
diff --git a/src/nmt/frame.c b/src/nmt/frame.c
index 05b322a..e699709 100644
--- a/src/nmt/frame.c
+++ b/src/nmt/frame.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libhagelbarger/hagelbarger.h"
#include "nmt.h"
diff --git a/src/nmt/main.c b/src/nmt/main.c
index 684daa8..460ec57 100644
--- a/src/nmt/main.c
+++ b/src/nmt/main.c
@@ -26,7 +26,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../common/debug.h"
#include "nmt.h"
diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c
index 65d9f92..5eddd8a 100644
--- a/src/nmt/nmt.c
+++ b/src/nmt/nmt.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <errno.h>
#include <time.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libmncc/cause.h"
#include "nmt.h"
diff --git a/src/nmt/sms.c b/src/nmt/sms.c
index 3050f37..d36708d 100644
--- a/src/nmt/sms.c
+++ b/src/nmt/sms.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <time.h>
#include <errno.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "nmt.h"
diff --git a/src/nmt/transaction.c b/src/nmt/transaction.c
index c02408e..ae35f97 100644
--- a/src/nmt/transaction.c
+++ b/src/nmt/transaction.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "nmt.h"
#include "transaction.h"
diff --git a/src/r2000/Makefile.am b/src/r2000/Makefile.am
index 0b95757..6a70680 100644
--- a/src/r2000/Makefile.am
+++ b/src/r2000/Makefile.am
@@ -26,6 +26,7 @@ radiocom2000_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/r2000/dsp.c b/src/r2000/dsp.c
index f6a2adc..45de2c2 100644
--- a/src/r2000/dsp.c
+++ b/src/r2000/dsp.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "r2000.h"
#include "dsp.h"
diff --git a/src/r2000/main.c b/src/r2000/main.c
index 066916c..4789d9e 100644
--- a/src/r2000/main.c
+++ b/src/r2000/main.c
@@ -26,7 +26,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../common/debug.h"
#include "r2000.h"
diff --git a/src/r2000/r2000.c b/src/r2000/r2000.c
index 0784f8b..4ddebaa 100644
--- a/src/r2000/r2000.c
+++ b/src/r2000/r2000.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <errno.h>
#include <time.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libmncc/cause.h"
#include "r2000.h"
diff --git a/src/tacs/Makefile.am b/src/tacs/Makefile.am
index 1d6d43a..4f57fa1 100644
--- a/src/tacs/Makefile.am
+++ b/src/tacs/Makefile.am
@@ -25,6 +25,7 @@ tacs_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 6e1b2bf..57cf665 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -23,6 +23,7 @@ test_filter_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -61,6 +62,7 @@ test_emphasis_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -88,6 +90,7 @@ test_dms_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -115,6 +118,7 @@ test_sms_LDADD = \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsound/libsound.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/test/test_compandor.c b/src/test/test_compandor.c
index d222928..4f916a8 100644
--- a/src/test/test_compandor.c
+++ b/src/test/test_compandor.c
@@ -2,7 +2,7 @@
#include <stdint.h>
#include <math.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libcompandor/compandor.h"
#define level2db(level) (20 * log10(level))
diff --git a/src/test/test_dms.c b/src/test/test_dms.c
index 74f7eb8..18459b7 100644
--- a/src/test/test_dms.c
+++ b/src/test/test_dms.c
@@ -4,7 +4,7 @@
#include <math.h>
#include <string.h>
#include <unistd.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../nmt/nmt.h"
diff --git a/src/test/test_emphasis.c b/src/test/test_emphasis.c
index 1add085..7b87068 100644
--- a/src/test/test_emphasis.c
+++ b/src/test/test_emphasis.c
@@ -2,7 +2,7 @@
#include <stdint.h>
#include <math.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libfilter/iir_filter.h"
#include "../libemphasis/emphasis.h"
#include "../common/debug.h"
diff --git a/src/test/test_filter.c b/src/test/test_filter.c
index 10b1393..8a30dab 100644
--- a/src/test/test_filter.c
+++ b/src/test/test_filter.c
@@ -2,7 +2,7 @@
#include <stdint.h>
#include <math.h>
#include <string.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libfilter/iir_filter.h"
#include "../common/debug.h"
diff --git a/src/test/test_performance.c b/src/test/test_performance.c
index 100c050..3da9246 100644
--- a/src/test/test_performance.c
+++ b/src/test/test_performance.c
@@ -3,7 +3,7 @@
#include <math.h>
#include <string.h>
#include <sys/time.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libfilter/iir_filter.h"
#include "../libfm/fm.h"
#include "../common/debug.h"
diff --git a/src/test/test_sms.c b/src/test/test_sms.c
index 63726ca..69f6a08 100644
--- a/src/test/test_sms.c
+++ b/src/test/test_sms.c
@@ -4,7 +4,7 @@
#include <math.h>
#include <string.h>
#include <unistd.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../nmt/nmt.h"
diff --git a/src/tv/Makefile.am b/src/tv/Makefile.am
index d1677e4..6327fb0 100644
--- a/src/tv/Makefile.am
+++ b/src/tv/Makefile.am
@@ -19,6 +19,7 @@ osmotv_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
+ $(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/tv/bas.c b/src/tv/bas.c
index 86df443..24b7d99 100644
--- a/src/tv/bas.c
+++ b/src/tv/bas.c
@@ -20,7 +20,7 @@
#include <string.h>
#include <stdint.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libfilter/iir_filter.h"
#include "bas.h"
#include "vcr.h"
diff --git a/src/tv/fubk.c b/src/tv/fubk.c
index 56213e9..23e5e32 100644
--- a/src/tv/fubk.c
+++ b/src/tv/fubk.c
@@ -20,7 +20,7 @@
#include <math.h>
#include <stdlib.h>
#include <stdint.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "fubk.h"
#include "font.h"
diff --git a/src/tv/image.c b/src/tv/image.c
index 85ca9f5..b2dcc45 100644
--- a/src/tv/image.c
+++ b/src/tv/image.c
@@ -19,7 +19,7 @@
#include <math.h>
#include <stdlib.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "image.h"
/* render image line starting with x and end with LINE_LENGTH
diff --git a/src/tv/main.c b/src/tv/main.c
index ed4558f..4c2a2cc 100644
--- a/src/tv/main.c
+++ b/src/tv/main.c
@@ -27,7 +27,7 @@ enum paging_signal;
#include <getopt.h>
#include <signal.h>
#include <math.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "../libfilter/iir_filter.h"
#include "../libfm/fm.h"
#include "../libwave/wave.h"
diff --git a/src/tv/tv_modulate.c b/src/tv/tv_modulate.c
index ac93ece..f6850a5 100644
--- a/src/tv/tv_modulate.c
+++ b/src/tv/tv_modulate.c
@@ -19,7 +19,7 @@
#include <math.h>
#include <stdint.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "tv_modulate.h"
#define WHITE_MODULATION 0.1
diff --git a/src/tv/vcr.c b/src/tv/vcr.c
index cfbe84d..673c65f 100644
--- a/src/tv/vcr.c
+++ b/src/tv/vcr.c
@@ -20,7 +20,7 @@
#include <math.h>
#include <stdlib.h>
#include <stdint.h>
-#include "../common/sample.h"
+#include "../libsample/sample.h"
#include "vcr.h"
/* test ID of calibration part: