SHA256
1
0
forked from pool/codec2

- Update to version 1.0.3:

* Internal changes only
- Drop no longer needed patches:
  * moved-freedv_callback_rx_sym-into-internal-header.patch
  * codec2-no_return_random.patch
- Disable unit tests as they were not run anyways and require octave

OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/codec2?expand=0&rev=22
This commit is contained in:
Martin Pluskal
2022-01-21 07:54:43 +00:00
committed by Git OBS Bridge
parent 1a77b0481f
commit 385df1127f
6 changed files with 17 additions and 66 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:14227963940d79e0ec5af810f37101b30e1c7e8555abd96c56b3c0473abac8ef
size 15062219

3
codec2-1.0.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:48162d562ea3bf4ca273f3c45df04505a006bd9a2b376006c75706c4de957da7
size 15000736

View File

@@ -1,11 +0,0 @@
diff -up codec2-1.0.0/src/gp_interleaver.c.aaaa codec2-1.0.0/src/gp_interleaver.c
--- codec2-1.0.0/src/gp_interleaver.c.aaaa 2021-08-15 21:49:47.062641389 +0200
+++ codec2-1.0.0/src/gp_interleaver.c 2021-08-15 21:50:14.712490217 +0200
@@ -65,6 +65,7 @@ int choose_interleaver_b(int Nbits)
fprintf(stderr, "gp_interleaver: Nbits: %d, b not found!\n", Nbits);
assert(0);
+ return(0);
}

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Jan 21 07:44:06 UTC 2022 - Martin Pluskal <mpluskal@suse.com>
- Update to version 1.0.3:
* Internal changes only
- Drop no longer needed patches:
* moved-freedv_callback_rx_sym-into-internal-header.patch
* codec2-no_return_random.patch
- Disable unit tests as they were not run anyways and require octave
-------------------------------------------------------------------
Tue Oct 5 12:55:41 UTC 2021 - Wojciech Kazubski <wk@ire.pw.edu.pl>

View File

@@ -1,7 +1,7 @@
#
# spec file for package codec2
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%define libname lib%{name}-1_0
Name: codec2
Version: 1.0.1
Version: 1.0.3
Release: 0
Summary: Low bit rate speech codec
# octave and asterisk directories contain GPL-2.0 licensed code but its not
@@ -29,8 +29,6 @@ URL: https://rowetel.com/codec2.html
Source: https://github.com/drowe67/codec2/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Source2: baselibs.conf
Patch0: codec2-no_return_random.patch
Patch1: moved-freedv_callback_rx_sym-into-internal-header.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@@ -72,12 +70,12 @@ BuildArch: noarch
Example code for Codec 2, including test voices and matlab/octave files.
%prep
%autosetup -p1
%autosetup
%build
%cmake \
-DINSTALL_EXAMPLES=TRUE \
-DUNITTEST=TRUE
-DUNITTEST=FALSE
%cmake_build
%install

View File

@@ -1,46 +0,0 @@
From 7a554bad2f28a4cf19cddf43c619fe5921ddaea3 Mon Sep 17 00:00:00 2001
From: drowe67 <david@rowetel.com>
Date: Sat, 2 Oct 2021 15:48:09 +0930
Subject: [PATCH] moved freedv_callback_rx_sym typedef and function into
freedv_api_internal.h
---
src/freedv_api.h | 2 --
src/freedv_api_internal.h | 4 ++++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/freedv_api.h b/src/freedv_api.h
index 23c5fef8..9393bd80 100644
--- a/src/freedv_api.h
+++ b/src/freedv_api.h
@@ -145,7 +145,6 @@ struct freedv_advanced {
// Called when text message char is decoded
typedef void (*freedv_callback_rx)(void *, char);
-typedef void (*freedv_callback_rx_sym)(void *, _Complex float, float);
// Called when new text message char is needed
typedef char (*freedv_callback_tx)(void *);
typedef void (*freedv_calback_error_pattern)
@@ -212,7 +211,6 @@ int freedv_check_crc16_unpacked(unsigned char *unpacked_bits, int nbits);
// Set parameters ------------------------------------------------------------
void freedv_set_callback_txt (struct freedv *freedv, freedv_callback_rx rx, freedv_callback_tx tx, void *callback_state);
-void freedv_set_callback_txt_sym (struct freedv *freedv, freedv_callback_rx_sym rx, void *callback_state);
void freedv_set_callback_protocol (struct freedv *freedv, freedv_callback_protorx rx, freedv_callback_prototx tx, void *callback_state);
void freedv_set_callback_data (struct freedv *freedv, freedv_callback_datarx datarx, freedv_callback_datatx datatx, void *callback_state);
void freedv_set_test_frames (struct freedv *freedv, int test_frames);
diff --git a/src/freedv_api_internal.h b/src/freedv_api_internal.h
index 0197e184..e7a9526c 100644
--- a/src/freedv_api_internal.h
+++ b/src/freedv_api_internal.h
@@ -230,6 +230,10 @@ int freedv_rx_fsk_ldpc_data(struct freedv *f, COMP demod_in[]);
int freedv_bits_to_speech(struct freedv *f, short speech_out[], short demod_in[], int rx_status);
+// for the reliable text protocol we need to pass symbols back rather than text
+typedef void (*freedv_callback_rx_sym)(void *, _Complex float, float);
+void freedv_set_callback_txt_sym (struct freedv *freedv, freedv_callback_rx_sym rx, void *callback_state);
+
#ifdef __cplusplus
}
#endif