Update Readme and Screenshots; Keyboard Shortcuts;
This commit is contained in:
parent
9f624e0b62
commit
638f212525
132
README.md
132
README.md
|
|
@ -1,5 +1,137 @@
|
||||||
## WARNING! The DEV branch may have broken or incomplete features, changes in Menu or CLI options, and other quirks. USE AT YOUR OWN RISK!
|
## WARNING! The DEV branch may have broken or incomplete features, changes in Menu or CLI options, and other quirks. USE AT YOUR OWN RISK!
|
||||||
|
|
||||||
|
If you want to checkout and build this branch (for testing purposes) ignore the automatic scripts and instructions further down below, run these steps instead
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install libpulse-dev pavucontrol libsndfile1-dev libfftw3-dev liblapack-dev socat libusb-1.0-0-dev libncurses5 libncurses5-dev rtl-sdr librtlsdr-dev libusb-1.0-0-dev cmake git wget make build-essential libitpp-dev libncursesw5-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/lwvmobile/dsd-fme
|
||||||
|
cd dsd-fme
|
||||||
|
git branch -a
|
||||||
|
git checkout remotes/origin/dev
|
||||||
|
git checkout -b dev
|
||||||
|
git branch -a #double check to see if you are on dev branch
|
||||||
|
sudo cp tone8.wav /usr/share/
|
||||||
|
sudo cp tone24.wav /usr/share/
|
||||||
|
sudo chmod 777 /usr/share/tone8.wav
|
||||||
|
sudo chmod 777 /usr/share/tone24.wav
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
make -j `nproc`
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Experimental Functions and Features---------------------------------------------------
|
||||||
|
-i <device> Audio input device (default is pulse audio)
|
||||||
|
|
||||||
|
- for piped stdin
|
||||||
|
|
||||||
|
rtl for rtl device
|
||||||
|
|
||||||
|
tcp for tcp client SDR++/GNURadio Companion/Other (Port 7355)
|
||||||
|
|
||||||
|
filename.bin for OP25/FME capture bin files
|
||||||
|
|
||||||
|
filename.wav for 48K/1 wav files (SDR++, GQRX)
|
||||||
|
|
||||||
|
filename.wav -s 96000 for 96K/1 wav files (DSDPlus)
|
||||||
|
(Use single quotes '/directory/audio file.wav' when directories/spaces are present)
|
||||||
|
|
||||||
|
-s <rate> Sample Rate of wav input files (usually 48000 or 96000) Mono only!
|
||||||
|
|
||||||
|
-----command line switches here subject to change------------------
|
||||||
|
-1 <file> Import LCN Frequencies from csv file (numeral 'one')
|
||||||
|
(See lcn.csv for example)
|
||||||
|
-2 <file> Import Group List Allow/Block and Label from csv file (numeral 'two')
|
||||||
|
(See group.csv for example)
|
||||||
|
-3 Enable Experimental Trunking Features (P25/EDACS/NXDN-ish for now) with RIGCTL/TCP or RTL Input
|
||||||
|
-5 <udp p> Enable RIGCTL/TCP; Set UDP Port for RIGCTL. (4532 for SDR++)
|
||||||
|
|
||||||
|
```
|
||||||
|
### Input ###
|
||||||
|
|
||||||
|
--TCP Direct Audio Link with SDR++
|
||||||
|
|
||||||
|
`dsd-fme -i tcp` Currently defaults to localhost:7355 (SDR++)(User Configurable Later)
|
||||||
|
|
||||||
|
--48000/9600 Mono Wav File Input
|
||||||
|
|
||||||
|
`dsd-fme -i filename.wav` 48k/1 16-bit Audio
|
||||||
|
|
||||||
|
`dsd-fme -i filename.wav -s 96000` 96k/1 16-bit Audio (DSDPlus Raw Signal Wav Files)
|
||||||
|
|
||||||
|
Wav File Input Note: Due to 96000 rate audio requiring me to double the symbol rate and center, be sure to use the -s 96000 at the very end of the startup command. Also, some NXDN48/96 may have difficulties decoding properly with wav file input (especially from DSDPlus).
|
||||||
|
|
||||||
|
### Very Experimental EDACS/P25/NXDN Simple/Single VFO Trunking ###
|
||||||
|
|
||||||
|
EDACS Trunking will require an lcn csv file with lcn frequencies listed in order, comma seperated. Currently, LCN imports will be single system only to keep things simple and easy. See lcn.csv in the example folder provided.
|
||||||
|
|
||||||
|
--EDACS/PV Trunking using RIGCTL and TCP Direct Link Audio inside of SDR++ (Tested and Working on EDACS/EDACS-EA with Provoice only, no analog voice monitoring)
|
||||||
|
|
||||||
|
`dsd-fme -i tcp -fp -1 lcn.csv -2 group.csv -3 -5 4532 -N 2> log.ans`
|
||||||
|
|
||||||
|
--NXDN48 Trunking (standard band plan) with SDR++ (untested for frequency accuracy)
|
||||||
|
|
||||||
|
`dsd-fme -fi -i tcp -3 -5 4532 -N 2> log.ans`
|
||||||
|
|
||||||
|
--P25 Trunking P1 and P2 (C4FM) with SDR++
|
||||||
|
|
||||||
|
`dsd-fme -i tcp -3 -5 4532 -N 2> log.ans`
|
||||||
|
|
||||||
|
--P25 Trunking (CQPSK) with P1 Control Channel (Should switch symbol rate and center on Phase 2 audio channels)
|
||||||
|
|
||||||
|
`dsd-fme -i tcp -3 -5 4532 -N -mq 2> log.ans`
|
||||||
|
|
||||||
|
--P25 Trunking Phase 2 TDMA Control Channel systems with CQPSK (non Phase 1 systems)
|
||||||
|
|
||||||
|
`dsd-fme -i tcp -3 -5 4532 -N -f2 -m2 2> log.ans`
|
||||||
|
|
||||||
|
Trunking Note1: All samples above can also be run with the RTL input method and setting of RTL UDP remote port.
|
||||||
|
|
||||||
|
`dsd-fme -fp -i rtl -c 851M -P -2 -G 44 -D 0 -U 6020 -Y 24 -N -T -1 lcn.csv -2 groups.csv -3 2> log.ans`
|
||||||
|
|
||||||
|
Trunking Note2: CQPSK Phase 1 and Phase 2 Systems are subceptible to LSM distortion issues, but seem to do okay, but require really good signal. Some CRC issues still occur with Phase 2 TDMA LCCH Mac Signal that can affect reliability, I believe this issue is ultimately caused by the PSK demodulation inside of FME. I also don't believe this will work on 8-level PSK, but I cannot determine that at the moment.
|
||||||
|
|
||||||
|
Trunking Note3: DMR Trunking will take longer to implement due to the various types of trunking it can use. Hytera XPT, Connect Plus, Capacity Plus, and TIII trunking all require more research, coding, and testing to implement.
|
||||||
|
|
||||||
|
Trunking Note4: NXDN Trunking may also require an lcn file, but currently, the import function does not map frequencies to channel numbers, and 'standard' channel (0-800) frequencies have not been tested for accuracy, so while some primitive NXDN trunking is technically there, I cannot say that it will tune to the correct frequency on any system as of yet.
|
||||||
|
|
||||||
|
## NCurses Keyboard Shortcuts ##
|
||||||
|
|
||||||
|
Some Keyboard Shortcuts have been implemented for testing to see how users like them. Just hope nobody pushes a key on accident and doesn't know which one it was or what it does. The current list of keyboard shortcuts include:
|
||||||
|
|
||||||
|
```
|
||||||
|
esc - ncurses menu
|
||||||
|
q - quit
|
||||||
|
c - toggle compact mode
|
||||||
|
h - toggle call history
|
||||||
|
z - toggle console payloads
|
||||||
|
a - toggle call alert beep
|
||||||
|
4 - force dmr privacy key assertion over fid and svc bits
|
||||||
|
i - toggle signal inversion on types that can't auto detect (dmr, dpmr)
|
||||||
|
m - toggle c4fm/cqpsk 10/4 (everything but phase 2 signal)
|
||||||
|
M - toggle c4fm/cqpsk 8/3 (phase 2 tdma control channel)
|
||||||
|
t - toggle trunking (needs either rtl input, or rigctl setup at CLI)
|
||||||
|
R - start capturing symbol capture bin (date/time name file)
|
||||||
|
r - stop capturing symbol capture bin
|
||||||
|
spacebar - replay last symbol capture bin (captures must be stopped first)
|
||||||
|
s - stop playing symbol capture bin or wav input file
|
||||||
|
P - start per call decoded wav files
|
||||||
|
p - stop per call decoded wav files
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
More keyboard shortcuts will be added in time, more work will be needed for any shortcut that requires a box window for info entry (keys, etc).
|
||||||
|
|
||||||
|
|
||||||
# Digital Speech Decoder - Florida Man Edition
|
# Digital Speech Decoder - Florida Man Edition
|
||||||
|
|
||||||
This version of DSD is a flavor blend of [szechyjs](https://github.com/szechyjs/dsd "szechyjs") RTL branch and some of my own additions, along with portions of DMR and NXDN code from the [LouisErigHerve](https://github.com/LouisErigHerve/dsd "LouisErigHerve") branch. This code also borrows snippets, inspiration, and ideas from other open source works including [Boatbod OP25](https://github.com/boatbod/op25 "Boatbod OP25"), [DSDcc](https://github.com/f4exb/dsdcc "DSDcc"), [SDTRunk](https://github.com/DSheirer/sdrtrunk "SDRTrunk"), [MMDVMHost](https://github.com/g4klx/MMDVMHost "MMDVMHost"), [LFSR](https://github.com/mattames/LFSR "LFSR"), and [EZPWD-Reed-Solomon](https://github.com/pjkundert/ezpwd-reed-solomon "EZPWD"). This project wouldn't be possible without a few good people providing me plenty of sample audio files to run over and over again. Special thanks to jurek1111, KrisMar, noamlivne, racingfan360, iScottyBotty, LimaZulu and hrh17 for the many hours of wav samples submitted by them.
|
This version of DSD is a flavor blend of [szechyjs](https://github.com/szechyjs/dsd "szechyjs") RTL branch and some of my own additions, along with portions of DMR and NXDN code from the [LouisErigHerve](https://github.com/LouisErigHerve/dsd "LouisErigHerve") branch. This code also borrows snippets, inspiration, and ideas from other open source works including [Boatbod OP25](https://github.com/boatbod/op25 "Boatbod OP25"), [DSDcc](https://github.com/f4exb/dsdcc "DSDcc"), [SDTRunk](https://github.com/DSheirer/sdrtrunk "SDRTrunk"), [MMDVMHost](https://github.com/g4klx/MMDVMHost "MMDVMHost"), [LFSR](https://github.com/mattames/LFSR "LFSR"), and [EZPWD-Reed-Solomon](https://github.com/pjkundert/ezpwd-reed-solomon "EZPWD"). This project wouldn't be possible without a few good people providing me plenty of sample audio files to run over and over again. Special thanks to jurek1111, KrisMar, noamlivne, racingfan360, iScottyBotty, LimaZulu and hrh17 for the many hours of wav samples submitted by them.
|
||||||
|
|
|
||||||
BIN
dsd-fme.png
BIN
dsd-fme.png
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 578 KiB |
BIN
dsd-fme2.png
BIN
dsd-fme2.png
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 200 KiB |
|
|
@ -67,7 +67,7 @@ unsigned long long int call_matrix[33][6];
|
||||||
|
|
||||||
|
|
||||||
char * FM_bannerN[9] = {
|
char * FM_bannerN[9] = {
|
||||||
" ESC or Arrow Keys For Menu ",
|
" Press 'q' to quit ESC or Arrow Keys For Menu ",
|
||||||
" ██████╗ ██████╗██████╗ ███████╗███╗ ███╗███████╗ ",
|
" ██████╗ ██████╗██████╗ ███████╗███╗ ███╗███████╗ ",
|
||||||
" ██╔══██╗██╔════╝██╔══██╗ ██╔════╝████╗ ████║██╔════╝ ",
|
" ██╔══██╗██╔════╝██╔══██╗ ██╔════╝████╗ ████║██╔════╝ ",
|
||||||
" ██║ ██║╚█████╗ ██║ ██║ █████╗ ██╔████╔██║█████╗ ",
|
" ██║ ██║╚█████╗ ██║ ██║ █████╗ ██╔████╔██║█████╗ ",
|
||||||
|
|
@ -310,7 +310,7 @@ char *choices[] = {
|
||||||
"Decode XDMA (P25 and DMR BS/MS)",
|
"Decode XDMA (P25 and DMR BS/MS)",
|
||||||
"Decode D-STAR*",
|
"Decode D-STAR*",
|
||||||
"Decode P25-P1*",
|
"Decode P25-P1*",
|
||||||
"Decode ProVoice",
|
"Decode EDACS/PV",
|
||||||
"Decode DMR* (LEH)",
|
"Decode DMR* (LEH)",
|
||||||
"Decode dPMR",
|
"Decode dPMR",
|
||||||
"Decode NXDN48",
|
"Decode NXDN48",
|
||||||
|
|
@ -2017,7 +2017,17 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
}
|
}
|
||||||
if (opts->audio_in_type == 4)
|
if (opts->audio_in_type == 4)
|
||||||
{
|
{
|
||||||
printw ("| Symbol Capture Input: %s \n", opts->audio_in_dev);
|
printw ("| Direct Symbol Bin Input: %s \n", opts->audio_in_dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opts->audio_in_type == 8)
|
||||||
|
{
|
||||||
|
printw ("| Direct TCP Input: Port [%d] Sample Rate [%d] \n", opts->tcp_portno, opts->wav_sample_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opts->audio_in_type == 2)
|
||||||
|
{
|
||||||
|
printw ("| Direct WAV File Input: %s Sample Rate [%d] \n", opts->audio_in_dev, opts->wav_sample_rate);
|
||||||
}
|
}
|
||||||
if (opts->audio_in_type == 1)
|
if (opts->audio_in_type == 1)
|
||||||
{
|
{
|
||||||
|
|
@ -2051,11 +2061,11 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
}
|
}
|
||||||
if (opts->symbol_out_file[0] != 0 && opts->symbol_out == 1)
|
if (opts->symbol_out_file[0] != 0 && opts->symbol_out == 1)
|
||||||
{
|
{
|
||||||
printw ("| Writing Symbol Capture to Bin File: %s\n", opts->symbol_out_file);
|
printw ("| SymbolC Bin: %s\n", opts->symbol_out_file);
|
||||||
}
|
}
|
||||||
if (opts->wav_out_file[0] != 0 && opts->dmr_stereo_wav == 0)
|
if (opts->wav_out_file[0] != 0 && opts->dmr_stereo_wav == 0)
|
||||||
{
|
{
|
||||||
printw ("| Writing Decoded Audio to WAV File: %s\n", opts->wav_out_file);
|
printw ("| Decoded WAV: %s\n", opts->wav_out_file);
|
||||||
}
|
}
|
||||||
if (opts->dmr_stereo_wav == 1) //opts->wav_out_file[0] != 0 &&
|
if (opts->dmr_stereo_wav == 1) //opts->wav_out_file[0] != 0 &&
|
||||||
{
|
{
|
||||||
|
|
@ -2068,7 +2078,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
}
|
}
|
||||||
if (opts->p25_trunk == 1 && (opts->use_rigctl == 1 || opts->audio_in_type == 3) )
|
if (opts->p25_trunk == 1 && (opts->use_rigctl == 1 || opts->audio_in_type == 3) )
|
||||||
{
|
{
|
||||||
printw ("| Trunk Tracking Active (P25/EDACS)\n");
|
printw ("| Trunk Tracking Active (P25/EDACS/NXDN)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2712,7 +2722,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
for (short int j = 0; j < 10; j++)
|
for (short int j = 0; j < 10; j++)
|
||||||
{
|
{
|
||||||
//only print if a valid time was assigned to the matrix, and not EDACS/PV
|
//only print if a valid time was assigned to the matrix, and not EDACS/PV
|
||||||
if ( ((time(NULL) - call_matrix[9-j][5]) < 9999) && call_matrix[9-j][0] != 14 && call_matrix[9-j][0] != 15 && call_matrix[9-j][0] != 37 && call_matrix[9-j][0] != 38 )
|
if ( ((time(NULL) - call_matrix[9-j][5]) < 999999) && call_matrix[9-j][0] != 14 && call_matrix[9-j][0] != 15 && call_matrix[9-j][0] != 37 && call_matrix[9-j][0] != 38 )
|
||||||
{
|
{
|
||||||
printw ("| %s ", SyncTypes[call_matrix[9-j][0]]);
|
printw ("| %s ", SyncTypes[call_matrix[9-j][0]]);
|
||||||
if (lls == 28 || lls == 29)
|
if (lls == 28 || lls == 29)
|
||||||
|
|
@ -2779,31 +2789,208 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
//keyboard shortcuts - codes same as ascii codes
|
//keyboard shortcuts - codes same as ascii codes
|
||||||
if (c == 27) //esc key, open menu
|
if (c == 27) //esc key, open menu
|
||||||
{
|
{
|
||||||
ncursesMenu (opts, state); //just a quick test
|
ncursesMenu (opts, state); //just a quick test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c == 122) //'z' key, toggle payload to console
|
||||||
|
{
|
||||||
|
if (opts->payload == 1) opts->payload = 0;
|
||||||
|
else opts->payload = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (c == 99) //'c' key, toggle compact mode
|
if (c == 99) //'c' key, toggle compact mode
|
||||||
{
|
{
|
||||||
if (opts->ncurses_compact == 1) opts->ncurses_compact = 0;
|
if (opts->ncurses_compact == 1) opts->ncurses_compact = 0;
|
||||||
else opts->ncurses_compact = 1;
|
else opts->ncurses_compact = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == 116) //'t' key, toggle trunking
|
if (c == 116) //'t' key, toggle trunking
|
||||||
{
|
{
|
||||||
if (opts->p25_trunk == 1) opts->p25_trunk = 0;
|
if (opts->p25_trunk == 1) opts->p25_trunk = 0;
|
||||||
else opts->p25_trunk = 1;
|
else opts->p25_trunk = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == 97) //'a' key, toggle call alert beep
|
if (c == 97) //'a' key, toggle call alert beep
|
||||||
{
|
{
|
||||||
if (opts->call_alert == 1) opts->call_alert = 0;
|
if (opts->call_alert == 1) opts->call_alert = 0;
|
||||||
else opts->call_alert = 1;
|
else opts->call_alert = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == 104) //'h' key, toggle history
|
if (c == 104) //'h' key, toggle history
|
||||||
{
|
{
|
||||||
if (opts->ncurses_history == 1) opts->ncurses_history = 0;
|
if (opts->ncurses_history == 1) opts->ncurses_history = 0;
|
||||||
else opts->ncurses_history = 1;
|
else opts->ncurses_history = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c == 113) //'q' key, quit
|
||||||
|
{
|
||||||
|
ncursesClose();
|
||||||
|
cleanupAndExit (opts, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 52) // '4' key, toggle force privacy key over fid and svc (dmr)
|
||||||
|
{
|
||||||
|
if (state->M == 1) state->M = 0;
|
||||||
|
else state->M = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 105) //'i' key, toggle signal inversion on inverted types
|
||||||
|
{
|
||||||
|
//Set all signal for inversion or uninversion
|
||||||
|
if (opts->inverted_dmr == 0)
|
||||||
|
{
|
||||||
|
opts->inverted_dmr = 1;
|
||||||
|
opts->inverted_dpmr = 1;
|
||||||
|
opts->inverted_x2tdma = 1;
|
||||||
|
opts->inverted_ysf = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
opts->inverted_dmr = 0;
|
||||||
|
opts->inverted_dpmr = 0;
|
||||||
|
opts->inverted_x2tdma = 0;
|
||||||
|
opts->inverted_ysf = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 109) //'m' key, toggle qpsk/c4fm - everything but phase 2
|
||||||
|
{
|
||||||
|
if (state->rf_mod == 0)
|
||||||
|
{
|
||||||
|
state->rf_mod = 1;
|
||||||
|
state->samplesPerSymbol = 10;
|
||||||
|
state->symbolCenter = 4;
|
||||||
|
opts->mod_c4fm = 0;
|
||||||
|
opts->mod_qpsk = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
state->rf_mod = 0;
|
||||||
|
state->samplesPerSymbol = 10;
|
||||||
|
state->symbolCenter = 4;
|
||||||
|
opts->mod_c4fm = 1;
|
||||||
|
opts->mod_qpsk = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 77) //'M' key, toggle qpsk - phase 2
|
||||||
|
{
|
||||||
|
if (state->rf_mod == 0)
|
||||||
|
{
|
||||||
|
state->rf_mod = 1;
|
||||||
|
state->samplesPerSymbol = 8;
|
||||||
|
state->symbolCenter = 3;
|
||||||
|
opts->mod_c4fm = 0;
|
||||||
|
opts->mod_qpsk = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
state->rf_mod = 0;
|
||||||
|
state->samplesPerSymbol = 10;
|
||||||
|
state->symbolCenter = 4;
|
||||||
|
opts->mod_c4fm = 1;
|
||||||
|
opts->mod_qpsk = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 82) //'R', save symbol capture bin with date/time string as name
|
||||||
|
{
|
||||||
|
sprintf (opts->symbol_out_file, "%s %s.bin", getDateN(), getTimeN());
|
||||||
|
if (opts->symbol_out_file[0] != 0)
|
||||||
|
{
|
||||||
|
opts->symbol_out = 1; //set flag to 1
|
||||||
|
openSymbolOutFile (opts, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 114) //'r' key, stop capturing symbol capture bin file
|
||||||
|
{
|
||||||
|
if (opts->symbol_out == 1)
|
||||||
|
{
|
||||||
|
if (opts->symbol_out_file[0] != 0)
|
||||||
|
{
|
||||||
|
fclose(opts->symbol_out_f);
|
||||||
|
sprintf (opts->audio_in_dev, "%s", opts->symbol_out_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
opts->symbol_out = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 32) //'space bar' replay last bin file (rework to do wav files too?)
|
||||||
|
{
|
||||||
|
struct stat stat_buf;
|
||||||
|
if (stat(opts->audio_in_dev, &stat_buf) != 0)
|
||||||
|
{
|
||||||
|
fprintf (stderr,"Error, couldn't open %s\n", opts->audio_in_dev);
|
||||||
|
goto SKIPR;
|
||||||
|
}
|
||||||
|
if (S_ISREG(stat_buf.st_mode))
|
||||||
|
{
|
||||||
|
opts->symbolfile = fopen(opts->audio_in_dev, "r");
|
||||||
|
opts->audio_in_type = 4; //symbol capture bin files
|
||||||
|
}
|
||||||
|
SKIPR: ; //do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == 80) //'P' key - start per call wav files
|
||||||
|
{
|
||||||
|
char wav_file_directory[1024];
|
||||||
|
sprintf (wav_file_directory, "./WAV");
|
||||||
|
wav_file_directory[1023] = '\0';
|
||||||
|
if (stat(wav_file_directory, &st_wav) == -1)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "-T %s wav file directory does not exist\n", wav_file_directory);
|
||||||
|
fprintf (stderr, "Creating directory %s to save decoded wav files\n", wav_file_directory);
|
||||||
|
mkdir(wav_file_directory, 0700);
|
||||||
|
}
|
||||||
|
opts->dmr_stereo_wav = 1;
|
||||||
|
//catch all in case of no file name set, won't crash or something
|
||||||
|
sprintf (opts->wav_out_file, "./WAV/DSD-FME-T1.wav");
|
||||||
|
sprintf (opts->wav_out_fileR, "./WAV/DSD-FME-T2.wav");
|
||||||
|
openWavOutFileL (opts, state);
|
||||||
|
openWavOutFileR (opts, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
//this one could cause issues, but seems okay
|
||||||
|
if (c == 112) //'p' key - stop all per call wav files
|
||||||
|
{
|
||||||
|
//hope this one doesn't cause random crashing or garbage writing
|
||||||
|
closeWavOutFile (opts, state);
|
||||||
|
closeWavOutFileL (opts, state);
|
||||||
|
closeWavOutFileR (opts, state);
|
||||||
|
sprintf (opts->wav_out_file, "%s", "");
|
||||||
|
sprintf (opts->wav_out_fileR, "%s", "");
|
||||||
|
opts->dmr_stereo_wav = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (c == 115) //'s' key, stop playing wav or symbol in files
|
||||||
|
{
|
||||||
|
if (opts->symbolfile != NULL)
|
||||||
|
{
|
||||||
|
if (opts->audio_in_type == 4)
|
||||||
|
{
|
||||||
|
fclose(opts->symbolfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opts->audio_in_type == 2) //wav input file
|
||||||
|
{
|
||||||
|
sf_close(opts->audio_in_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
opts->audio_in_type = 0;
|
||||||
|
openPulseInput(opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//anything with an entry box will need the inputs and outputs stopped first
|
||||||
|
//so probably just write a function to handle c input, and when c = certain values
|
||||||
|
//needing an entry box, then stop all of those
|
||||||
|
|
||||||
} //end ncursesPrinter
|
} //end ncursesPrinter
|
||||||
|
|
||||||
void ncursesClose ()
|
void ncursesClose ()
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
|
||||||
else slot = state->currentslot;
|
else slot = state->currentslot;
|
||||||
|
|
||||||
//assigning here if OECI MAC SIGNAL, after passing RS and CRC
|
//assigning here if OECI MAC SIGNAL, after passing RS and CRC
|
||||||
if (state->p2_is_lcch = 1)
|
if (state->p2_is_lcch == 1)
|
||||||
{
|
{
|
||||||
if (slot == 1) state->dmrburstL = 30;
|
if (slot == 1) state->dmrburstL = 30;
|
||||||
else state->dmrburstR = 30;
|
else state->dmrburstR = 30;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue