From 7a554bad2f28a4cf19cddf43c619fe5921ddaea3 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Sat, 2 Oct 2021 15:48:09 +0930 Subject: [PATCH] moved freedv_callback_rx_sym typedef and function into freedv_api_internal.h Project-Bug-URL: https://github.com/drowe67/codec2/pull/235 Gentoo-Bug-URL: https://bugs.gentoo.org/816453 --- 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