diff --git a/test/001_highsnr_stdio_audio/test_multimode_rx.py b/test/001_highsnr_stdio_audio/test_multimode_rx.py index 0f14182d..8a0ffa94 100755 --- a/test/001_highsnr_stdio_audio/test_multimode_rx.py +++ b/test/001_highsnr_stdio_audio/test_multimode_rx.py @@ -9,8 +9,8 @@ import sys import ctypes from ctypes import * import pathlib -sys.path.insert(0,'..') -import codec2 +sys.path.insert(0,'../..') +from tnc import codec2 import numpy as np #--------------------------------------------GET PARAMETER INPUTS diff --git a/test/001_highsnr_stdio_audio/test_multimode_tx.py b/test/001_highsnr_stdio_audio/test_multimode_tx.py index ae0308c7..22f77004 100644 --- a/test/001_highsnr_stdio_audio/test_multimode_tx.py +++ b/test/001_highsnr_stdio_audio/test_multimode_tx.py @@ -11,8 +11,8 @@ import threading import audioop import argparse import sys -sys.path.insert(0,'..') -import codec2 +sys.path.insert(0,'../..') +from tnc import codec2 import numpy as np # GET PARAMETER INPUTS diff --git a/test/001_highsnr_stdio_audio/test_rx.py b/test/001_highsnr_stdio_audio/test_rx.py index 5e90b435..f29ea33d 100644 --- a/test/001_highsnr_stdio_audio/test_rx.py +++ b/test/001_highsnr_stdio_audio/test_rx.py @@ -17,8 +17,9 @@ import threading import sys import argparse import numpy as np -sys.path.insert(0,'..') -import codec2 +sys.path.insert(0,'../..') +from tnc import codec2 + #--------------------------------------------GET PARAMETER INPUTS parser = argparse.ArgumentParser(description='Simons TEST TNC') diff --git a/test/001_highsnr_stdio_audio/test_tx.py b/test/001_highsnr_stdio_audio/test_tx.py index 1eeac6a7..581eae2d 100644 --- a/test/001_highsnr_stdio_audio/test_tx.py +++ b/test/001_highsnr_stdio_audio/test_tx.py @@ -9,8 +9,8 @@ import pyaudio import time import argparse import sys -sys.path.insert(0,'..') -import codec2 +sys.path.insert(0,'../..') +from tnc import codec2 import numpy as np # GET PARAMETER INPUTS diff --git a/test/codec2.py b/tnc/codec2.py similarity index 99% rename from test/codec2.py rename to tnc/codec2.py index 6ce6e252..5126d167 100644 --- a/test/codec2.py +++ b/tnc/codec2.py @@ -139,7 +139,8 @@ class resampler: print("create 48<->8 kHz resampler") self.filter_mem8 = np.zeros(self.MEM8, dtype=np.int16) self.filter_mem48 = np.zeros(self.MEM48) - + + def resample48_to_8(self,in48): assert in48.dtype == np.int16 # length of input vector must be an integer multiple of api.FDMDV_OS_48