Browse Source

Export alaw and ulaw decoder/encoder

master
Jeroen Vreeken 1 year ago
parent
commit
4a4d7581a5
10 changed files with 19 additions and 19 deletions
  1. +4
    -4
      Makefile.am
  2. +1
    -1
      alaw.c
  3. +2
    -2
      analog_trx.c
  4. +3
    -3
      eth_ar/alaw.h
  5. +3
    -3
      eth_ar/ulaw.h
  6. +1
    -1
      freedv_eth.c
  7. +1
    -1
      freedv_eth_baseband_in.c
  8. +1
    -1
      freedv_eth_rxa.c
  9. +2
    -2
      freedv_eth_transcode.c
  10. +1
    -1
      ulaw.c

+ 4
- 4
Makefile.am View File

@ -4,11 +4,11 @@ CFLAGS+= -Wall -Werror -O3
lib_LTLIBRARIES=libeth_ar.la
libeth_ar_la_SOURCES= eth_ar.c fprs.c fprs2aprs.c
libeth_ar_la_SOURCES= eth_ar.c fprs.c fprs2aprs.c alaw.c ulaw.c
libeth_ar_la_CFLAGS=-fPIC
libeth_ar_la_LDFLAGS= -fPIC -version-info 1:0:1 -lm
nobase_include_HEADERS = eth_ar/eth_ar.h eth_ar/fprs.h
nobase_include_HEADERS = eth_ar/eth_ar.h eth_ar/fprs.h eth_ar/alaw.h eth_ar/ulaw.h
bin_PROGRAMS = eth_ar_callssid2mac
noinst_PROGRAMS = eth_ar_if fprs_test emphasis_test eth_ar_test test_eth
@ -17,11 +17,11 @@ if ENABLE_HAMLIB
if ENABLE_SAMPLERATE
bin_PROGRAMS += analog_trx freedv_eth fprs2aprs_gate eth_ar_if fprs_request fprs_destination fprs_monitor eth_ar_callssid2mac
analog_trx_SOURCES = sound.c alaw.c ulaw.c dsp.c io.c interface.c analog_trx.c freedv_eth_config.c
analog_trx_SOURCES = sound.c dsp.c io.c interface.c analog_trx.c freedv_eth_config.c
analog_trx_LDADD = libeth_ar.la
analog_trx_LDFLAGS = -lcodec2 -lsamplerate -lasound -lhamlib -lpthread -lm
freedv_eth_SOURCES = sound.c alaw.c ulaw.c dsp.c io.c interface.c nmea.c freedv_eth.c freedv_eth_rx.c freedv_eth_config.c freedv_eth_transcode.c freedv_eth_queue.c freedv_eth_tx.c freedv_eth_txa.c ctcss.c beacon.c emphasis.c freedv_eth_rxa.c freedv_eth_baseband_in.c
freedv_eth_SOURCES = sound.c dsp.c io.c interface.c nmea.c freedv_eth.c freedv_eth_rx.c freedv_eth_config.c freedv_eth_transcode.c freedv_eth_queue.c freedv_eth_tx.c freedv_eth_txa.c ctcss.c beacon.c emphasis.c freedv_eth_rxa.c freedv_eth_baseband_in.c
freedv_eth_LDADD = libeth_ar.la
freedv_eth_LDFLAGS = -lcodec2 -lsamplerate -lasound -lhamlib -lpthread -lm


+ 1
- 1
alaw.c View File

@ -18,7 +18,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "alaw.h"
#include "eth_ar/alaw.h"
#include <stdint.h>
static int16_t alaw_to_s16 (uint8_t a_val)


+ 2
- 2
analog_trx.c View File

@ -33,8 +33,8 @@
#include "interface.h"
#include <eth_ar/eth_ar.h>
#include "sound.h"
#include "alaw.h"
#include "ulaw.h"
#include "eth_ar/alaw.h"
#include "eth_ar/ulaw.h"
#include "io.h"
#include "ctcss.h"
#include "eth_ar_codec2.h"


alaw.h → eth_ar/alaw.h View File

@ -16,12 +16,12 @@
*/
#ifndef _INCLUDE_ALAW_H_
#define _INCLUDE_ALAW_H_
#ifndef _INCLUDE_ETHAR_ALAW_H_
#define _INCLUDE_ETHAR_ALAW_H_
#include <stdint.h>
void alaw_decode(int16_t *samples, uint8_t *alaw, int nr);
void alaw_encode(uint8_t *alaw, int16_t *samples, int nr);
#endif /* _INCLUDE_ALAW_H_ */
#endif /* _INCLUDE_ETHAR_ALAW_H_ */

ulaw.h → eth_ar/ulaw.h View File

@ -16,12 +16,12 @@
*/
#ifndef _INCLUDE_ULAW_H_
#define _INCLUDE_ULAW_H_
#ifndef _INCLUDE_ETHAR_ULAW_H_
#define _INCLUDE_ETHAR_ULAW_H_
#include <stdint.h>
void ulaw_decode(int16_t *samples, uint8_t *ulaw, int nr);
void ulaw_encode(uint8_t *ulaw, int16_t *samples, int nr);
#endif /* _INCLUDE_ULAW_H_ */
#endif /* _INCLUDE_ETHAR_ULAW_H_ */

+ 1
- 1
freedv_eth.c View File

@ -43,7 +43,7 @@
#include "freedv_eth.h"
#include "freedv_eth_config.h"
#include "io.h"
#include "alaw.h"
#include "eth_ar/alaw.h"
static bool verbose;
static bool fullduplex;


+ 1
- 1
freedv_eth_baseband_in.c View File

@ -22,7 +22,7 @@
#include "dtmf.h"
#include "emphasis.h"
#include "interface.h"
#include "alaw.h"
#include "eth_ar/alaw.h"
#include "sound.h"
#include "ctcss.h"
#include "eth_ar_codec2.h"


+ 1
- 1
freedv_eth_rxa.c View File

@ -22,7 +22,7 @@
#include "dtmf.h"
#include "emphasis.h"
#include "interface.h"
#include "alaw.h"
#include "eth_ar/alaw.h"
#include "sound.h"
#include "ctcss.h"
#include "eth_ar_codec2.h"


+ 2
- 2
freedv_eth_transcode.c View File

@ -18,8 +18,8 @@
#include "freedv_eth.h"
#include "eth_ar_codec2.h"
#include "alaw.h"
#include "ulaw.h"
#include "eth_ar/alaw.h"
#include "eth_ar/ulaw.h"
#include "stdio.h"
#include <stdlib.h>


+ 1
- 1
ulaw.c View File

@ -20,7 +20,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "ulaw.h"
#include "eth_ar/ulaw.h"
#define BIAS (0x84) /* Bias for linear code. */
#define SIGN_BIT (0x80) /* Sign bit for a u-law byte. */


Loading…
Cancel
Save