mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
adjusted ctests to new codec2 module structure
This commit is contained in:
parent
df78e11bc3
commit
05290ae5ba
3 changed files with 9 additions and 9 deletions
|
@ -113,7 +113,7 @@ class Test:
|
||||||
|
|
||||||
# open codec2 instance
|
# open codec2 instance
|
||||||
self.datac0_freedv = ctypes.cast(
|
self.datac0_freedv = ctypes.cast(
|
||||||
codec2.api.freedv_open(codec2.api.FREEDV_MODE_DATAC0), ctypes.c_void_p
|
codec2.api.freedv_open(codec2.FREEDV_MODE.datac0.value), ctypes.c_void_p
|
||||||
)
|
)
|
||||||
self.datac0_bytes_per_frame = int(
|
self.datac0_bytes_per_frame = int(
|
||||||
codec2.api.freedv_get_bits_per_modem_frame(self.datac0_freedv) / 8
|
codec2.api.freedv_get_bits_per_modem_frame(self.datac0_freedv) / 8
|
||||||
|
@ -125,7 +125,7 @@ class Test:
|
||||||
self.datac0_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
self.datac0_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
||||||
|
|
||||||
self.datac1_freedv = ctypes.cast(
|
self.datac1_freedv = ctypes.cast(
|
||||||
codec2.api.freedv_open(codec2.api.FREEDV_MODE_DATAC1), ctypes.c_void_p
|
codec2.api.freedv_open(codec2.FREEDV_MODE.datac1.value), ctypes.c_void_p
|
||||||
)
|
)
|
||||||
self.datac1_bytes_per_frame = int(
|
self.datac1_bytes_per_frame = int(
|
||||||
codec2.api.freedv_get_bits_per_modem_frame(self.datac1_freedv) / 8
|
codec2.api.freedv_get_bits_per_modem_frame(self.datac1_freedv) / 8
|
||||||
|
@ -137,7 +137,7 @@ class Test:
|
||||||
self.datac1_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
self.datac1_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
||||||
|
|
||||||
self.datac3_freedv = ctypes.cast(
|
self.datac3_freedv = ctypes.cast(
|
||||||
codec2.api.freedv_open(codec2.api.FREEDV_MODE_DATAC3), ctypes.c_void_p
|
codec2.api.freedv_open(codec2.FREEDV_MODE.datac3.value), ctypes.c_void_p
|
||||||
)
|
)
|
||||||
self.datac3_bytes_per_frame = int(
|
self.datac3_bytes_per_frame = int(
|
||||||
codec2.api.freedv_get_bits_per_modem_frame(self.datac3_freedv) / 8
|
codec2.api.freedv_get_bits_per_modem_frame(self.datac3_freedv) / 8
|
||||||
|
|
|
@ -111,7 +111,7 @@ class Test:
|
||||||
|
|
||||||
# open codec2 instance
|
# open codec2 instance
|
||||||
self.datac0_freedv = ctypes.cast(
|
self.datac0_freedv = ctypes.cast(
|
||||||
codec2.api.freedv_open(codec2.api.FREEDV_MODE_DATAC0), ctypes.c_void_p
|
codec2.api.freedv_open(codec2.FREEDV_MODE.datac0.value), ctypes.c_void_p
|
||||||
)
|
)
|
||||||
self.datac0_bytes_per_frame = int(
|
self.datac0_bytes_per_frame = int(
|
||||||
codec2.api.freedv_get_bits_per_modem_frame(self.datac0_freedv) / 8
|
codec2.api.freedv_get_bits_per_modem_frame(self.datac0_freedv) / 8
|
||||||
|
@ -123,7 +123,7 @@ class Test:
|
||||||
self.datac0_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
self.datac0_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
||||||
|
|
||||||
self.datac1_freedv = ctypes.cast(
|
self.datac1_freedv = ctypes.cast(
|
||||||
codec2.api.freedv_open(codec2.api.FREEDV_MODE_DATAC1), ctypes.c_void_p
|
codec2.api.freedv_open(codec2.FREEDV_MODE.datac1.value), ctypes.c_void_p
|
||||||
)
|
)
|
||||||
self.datac1_bytes_per_frame = int(
|
self.datac1_bytes_per_frame = int(
|
||||||
codec2.api.freedv_get_bits_per_modem_frame(self.datac1_freedv) / 8
|
codec2.api.freedv_get_bits_per_modem_frame(self.datac1_freedv) / 8
|
||||||
|
@ -135,7 +135,7 @@ class Test:
|
||||||
self.datac1_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
self.datac1_buffer = codec2.audio_buffer(2 * self.AUDIO_FRAMES_PER_BUFFER)
|
||||||
|
|
||||||
self.datac3_freedv = ctypes.cast(
|
self.datac3_freedv = ctypes.cast(
|
||||||
codec2.api.freedv_open(codec2.api.FREEDV_MODE_DATAC3), ctypes.c_void_p
|
codec2.api.freedv_open(codec2.FREEDV_MODE.datac3.value), ctypes.c_void_p
|
||||||
)
|
)
|
||||||
self.datac3_bytes_per_frame = int(
|
self.datac3_bytes_per_frame = int(
|
||||||
codec2.api.freedv_get_bits_per_modem_frame(self.datac3_freedv) / 8
|
codec2.api.freedv_get_bits_per_modem_frame(self.datac3_freedv) / 8
|
||||||
|
|
|
@ -158,9 +158,9 @@ class Test:
|
||||||
def create_modulation(self):
|
def create_modulation(self):
|
||||||
|
|
||||||
modes = [
|
modes = [
|
||||||
codec2.api.FREEDV_MODE_DATAC0,
|
codec2.FREEDV_MODE.datac0.value,
|
||||||
codec2.api.FREEDV_MODE_DATAC1,
|
codec2.FREEDV_MODE.datac1.value,
|
||||||
codec2.api.FREEDV_MODE_DATAC3,
|
codec2.FREEDV_MODE.datac3.value,
|
||||||
]
|
]
|
||||||
for m in modes:
|
for m in modes:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue