From 347b85210125f0d6ebb345f42211619add549ca9 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Mon, 14 Dec 2015 07:38:58 +0000 Subject: [PATCH] changed port audio param for non-click operation git-svn-id: https://svn.code.sf.net/p/freetel/code@2526 01035d8c-6547-0410-b346-abe4f91aad63 --- freebeacon/freebeacon.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/freebeacon/freebeacon.c b/freebeacon/freebeacon.c index 0e85dbd7..9eca9a0c 100644 --- a/freebeacon/freebeacon.c +++ b/freebeacon/freebeacon.c @@ -47,8 +47,8 @@ [ ] FreeDV 700 support [ ] daemonise + change all fprintfs to use log file in daemon mode - [ ] test OTA on laptop - [ ] test OTA on RPi + [ ] test on laptop + [ ] test on RPi [ ] writing text string to a web page (cat, create if doesn't exist) [ ] samples from stdin option to work from sdr [ ] monitor rx and tx audio on another sound device @@ -59,9 +59,15 @@ + has audio interfaces, PTT, so neat solution Building: - Note you need the libraries on the gcc line installed (TODO find apt-get package names) + Download and "make install && ldconfig" codec2. On my Ubuntu 14 and RPi I had to add an extra search + path to the ld.conf.d directory to match the path the codec2 .so was installed in. + + apt-get install libsamplerate0-dev portaudio19-dev libportaudio-dev libsndfile1-dev gcc -I/usr/local/include/codec2 freebeacon.c -o freebeacon -lsamplerate -lportaudio -lsndfile -lcodec2 + Plug in your USB sound card and USB RS232 devices. + Use alsamixer to adjust levels on your sound card. + Usage: ./freebeacon -h @@ -71,6 +77,18 @@ Example usage: ./freebeacon -c /dev/ttyUSB1 --txfilename ~/codec2-dev/wav/vk5qi.wav --dev 4 -v --trigger hello + Testing sound cards on RPi: + + $ arecord -l + + **** List of CAPTURE Hardware Devices **** + card 1: Audio [RIGblaster Advantage Audio], device 0: USB Audio [USB Audio] + Subdevices: 1/1 + Subdevice #0: subdevice #0 + + $ arecord -D hw:1,0 -f S16_LE -r 48000 test.wav + $ aplay test.wav + */ #include @@ -510,7 +528,7 @@ int main(int argc, char *argv[]) { &inputParameters, &outputParameters, fssc, - 0, /* let the driver decide */ + n48, /* changed from 0 to n48 to get Rpi audio to work without clicks */ paClipOff, NULL, /* no callback, use blocking API */ NULL ); @@ -567,8 +585,8 @@ int main(int argc, char *argv[]) { for(j=0; j