aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-11-13 19:34:05 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-11-13 19:34:05 +0100
commit1b183864bb0dc135838cded1a3f31594979e837f (patch)
tree5e04a8d62a60422f4d4f7f646842e4ff06ce9b20
parent669705c6edb5cfbcb2f0ca672612777d1e819aa6 (diff)
Restructure: Move sample rate conversion from common code to 'libsamplerate'
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/amps/Makefile.am1
-rw-r--r--src/anetz/Makefile.am1
-rw-r--r--src/bnetz/Makefile.am1
-rw-r--r--src/cnetz/Makefile.am1
-rw-r--r--src/common/Makefile.am1
-rw-r--r--src/common/emphasis.h2
-rw-r--r--src/common/mncc_console.c2
-rw-r--r--src/common/sender.h2
-rw-r--r--src/jtacs/Makefile.am1
-rw-r--r--src/libsamplerate/Makefile.am6
-rw-r--r--src/libsamplerate/samplerate.c (renamed from src/common/samplerate.c)2
-rw-r--r--src/libsamplerate/samplerate.h (renamed from src/common/samplerate.h)0
-rw-r--r--src/nmt/Makefile.am1
-rw-r--r--src/r2000/Makefile.am1
-rw-r--r--src/tacs/Makefile.am1
-rw-r--r--src/test/Makefile.am4
19 files changed, 26 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 961b61b..f59d993 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@ compile
.libs
.dirstamp
m4
+src/libsamplerate/libsamplerate.a
src/libfilter/libfilter.a
src/common/libcommon.a
src/common/libmobile.a
diff --git a/configure.ac b/configure.ac
index cea6660..62e21b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@ AS_IF([test "x$with_soapy" == "xyes"],[AC_MSG_NOTICE( Compiling with SoapySDR su
AS_IF([test "x$somethingmagick" == "xyes"],[AC_MSG_NOTICE( Compiling with ImageMagick )],[AC_MSG_NOTICE( ImageMagick not supported )])
AC_OUTPUT(
+ src/libsamplerate/Makefile
src/libfilter/Makefile
src/common/Makefile
src/anetz/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 378d449..79f134e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = libfilter common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
+SUBDIRS = libsamplerate libfilter common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
diff --git a/src/amps/Makefile.am b/src/amps/Makefile.am
index 43e4887..390a69e 100644
--- a/src/amps/Makefile.am
+++ b/src/amps/Makefile.am
@@ -28,6 +28,7 @@ amps_LDADD = \
libamps.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/anetz/Makefile.am b/src/anetz/Makefile.am
index b742481..26ad266 100644
--- a/src/anetz/Makefile.am
+++ b/src/anetz/Makefile.am
@@ -14,6 +14,7 @@ anetz_LDADD = \
$(top_builddir)/src/common/libgermanton.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/bnetz/Makefile.am b/src/bnetz/Makefile.am
index 38adde6..f00b82b 100644
--- a/src/bnetz/Makefile.am
+++ b/src/bnetz/Makefile.am
@@ -16,6 +16,7 @@ bnetz_LDADD = \
$(top_builddir)/src/common/libgermanton.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/cnetz/Makefile.am b/src/cnetz/Makefile.am
index ee678e7..8065736 100644
--- a/src/cnetz/Makefile.am
+++ b/src/cnetz/Makefile.am
@@ -20,6 +20,7 @@ cnetz_LDADD = \
$(top_builddir)/src/common/libgermanton.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 7a59d64..6f8ae93 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -11,7 +11,6 @@ libcommon_a_SOURCES = \
goertzel.c \
jitter.c \
dtmf.c \
- samplerate.c \
emphasis.c \
compandor.c \
fft.c \
diff --git a/src/common/emphasis.h b/src/common/emphasis.h
index 0e91509..43d54e6 100644
--- a/src/common/emphasis.h
+++ b/src/common/emphasis.h
@@ -1,3 +1,5 @@
+#include "../libfilter/iir_filter.h"
+
typedef struct emphasis {
struct {
iir_filter_t lp;
diff --git a/src/common/mncc_console.c b/src/common/mncc_console.c
index 1e65d04..fc779f4 100644
--- a/src/common/mncc_console.c
+++ b/src/common/mncc_console.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <sys/time.h>
#include "sample.h"
-#include "samplerate.h"
+#include "../libsamplerate/samplerate.h"
#include "jitter.h"
#include "debug.h"
#include "testton.h"
diff --git a/src/common/sender.h b/src/common/sender.h
index 4ca728f..c222fda 100644
--- a/src/common/sender.h
+++ b/src/common/sender.h
@@ -3,7 +3,7 @@
#include "sdr.h"
#endif
#include "wave.h"
-#include "samplerate.h"
+#include "../libsamplerate/samplerate.h"
#include "jitter.h"
#include "emphasis.h"
#include "display.h"
diff --git a/src/jtacs/Makefile.am b/src/jtacs/Makefile.am
index b4e6fdf..763df25 100644
--- a/src/jtacs/Makefile.am
+++ b/src/jtacs/Makefile.am
@@ -14,6 +14,7 @@ jtacs_LDADD = \
../amps/libamps.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/libsamplerate/Makefile.am b/src/libsamplerate/Makefile.am
new file mode 100644
index 0000000..bd2319f
--- /dev/null
+++ b/src/libsamplerate/Makefile.am
@@ -0,0 +1,6 @@
+AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+
+noinst_LIBRARIES = libsamplerate.a
+
+libsamplerate_a_SOURCES = \
+ samplerate.c
diff --git a/src/common/samplerate.c b/src/libsamplerate/samplerate.c
index db6b278..fd2fea9 100644
--- a/src/common/samplerate.c
+++ b/src/libsamplerate/samplerate.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
-#include "sample.h"
+#include "../common/sample.h"
#include "samplerate.h"
int init_samplerate(samplerate_t *state, double low_samplerate, double high_samplerate, double filter_cutoff)
diff --git a/src/common/samplerate.h b/src/libsamplerate/samplerate.h
index 8f8ea87..8f8ea87 100644
--- a/src/common/samplerate.h
+++ b/src/libsamplerate/samplerate.h
diff --git a/src/nmt/Makefile.am b/src/nmt/Makefile.am
index 923dfde..4fde118 100644
--- a/src/nmt/Makefile.am
+++ b/src/nmt/Makefile.am
@@ -24,6 +24,7 @@ nmt_LDADD = \
libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/r2000/Makefile.am b/src/r2000/Makefile.am
index d17a392..704d734 100644
--- a/src/r2000/Makefile.am
+++ b/src/r2000/Makefile.am
@@ -14,6 +14,7 @@ radiocom2000_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/tacs/Makefile.am b/src/tacs/Makefile.am
index 190e9a2..7ba0e6a 100644
--- a/src/tacs/Makefile.am
+++ b/src/tacs/Makefile.am
@@ -15,6 +15,7 @@ tacs_LDADD = \
../amps/libamps.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 1c86d46..a30f003 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -15,6 +15,7 @@ test_filter_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
@@ -38,6 +39,7 @@ test_emphasis_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
@@ -51,6 +53,7 @@ test_dms_LDADD = \
$(top_builddir)/src/nmt/libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
@@ -64,6 +67,7 @@ test_sms_LDADD = \
$(top_builddir)/src/nmt/libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \