mirror of https://github.com/lwvmobile/dsd-fme.git
Mute NXDN and P25 ENC
Mute NXDN and P25 ENC by default, but still print frame payloads.
This commit is contained in:
parent
805fdd7583
commit
b9223e5207
|
|
@ -283,7 +283,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if using ??? dPMR? D-STAR? X2-TDMA?
|
//if using anything but DMR Stereo, borrowing state->dmr_encL to signal enc or clear for other types
|
||||||
if (opts->dmr_stereo == 0)
|
if (opts->dmr_stereo == 0)
|
||||||
{
|
{
|
||||||
mbe_processAmbe3600x2450Framef (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, ambe_fr, ambe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
|
mbe_processAmbe3600x2450Framef (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, ambe_fr, ambe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
|
||||||
|
|
@ -291,7 +291,8 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||||
{
|
{
|
||||||
PrintAMBEData (opts, state, ambe_d);
|
PrintAMBEData (opts, state, ambe_d);
|
||||||
}
|
}
|
||||||
if (opts->mbe_out_f != NULL)
|
//only save MBE files if not enc or unmuted, THIS does not seem to work for some reason
|
||||||
|
if (opts->mbe_out_f != NULL && (opts->unmute_encrypted_p25 == 1 || state->dmr_encL == 0) )
|
||||||
{
|
{
|
||||||
saveAmbe2450Data (opts, state, ambe_d);
|
saveAmbe2450Data (opts, state, ambe_d);
|
||||||
}
|
}
|
||||||
|
|
@ -346,8 +347,8 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if using ??? dPMR? D-STAR? X2-TDMA?
|
//if using anything but DMR Stereo, borrowing state->dmr_encL to signal enc or clear for other types
|
||||||
if (opts->dmr_stereo == 0)
|
if (opts->dmr_stereo == 0 && (opts->unmute_encrypted_p25 == 1 || state->dmr_encL == 0) )
|
||||||
{
|
{
|
||||||
state->debug_audio_errors += state->errs2;
|
state->debug_audio_errors += state->errs2;
|
||||||
processAudio (opts, state);
|
processAudio (opts, state);
|
||||||
|
|
@ -357,8 +358,8 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if using ??? dPMR? D-STAR? X2-TDMA?
|
//if using anything but DMR Stereo, borrowing state->dmr_encL to signal enc or clear for other types
|
||||||
if (opts->wav_out_f != NULL && opts->dmr_stereo == 0)
|
if (opts->wav_out_f != NULL && opts->dmr_stereo == 0 && (opts->unmute_encrypted_p25 == 1 || state->dmr_encL == 0))
|
||||||
{
|
{
|
||||||
writeSynthesizedVoice (opts, state);
|
writeSynthesizedVoice (opts, state);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1294,7 +1294,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
rdR = state->lastsrcR;
|
rdR = state->lastsrcR;
|
||||||
}
|
}
|
||||||
//move to seperate P25 version plz
|
//move to seperate P25 version plz
|
||||||
opts->p25enc = 0;
|
//opts->p25enc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//DMR TG
|
//DMR TG
|
||||||
|
|
@ -1311,7 +1311,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
tgR = state->lasttgR;
|
tgR = state->lasttgR;
|
||||||
|
|
||||||
}
|
}
|
||||||
opts->p25enc = 0;
|
//opts->p25enc = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,10 @@ resetState (dsd_state * state)
|
||||||
state->debug_header_critical_errors = 0;
|
state->debug_header_critical_errors = 0;
|
||||||
|
|
||||||
state->nxdn_last_ran = 0;
|
state->nxdn_last_ran = 0;
|
||||||
|
// state->payload_algid = 0;
|
||||||
|
// state->payload_algidR = 0;
|
||||||
|
state->dmr_encL = 0;
|
||||||
|
state->dmr_encR = 0;
|
||||||
|
|
||||||
//each time you run this, it increses memory use by 4MB, massive memory leak
|
//each time you run this, it increses memory use by 4MB, massive memory leak
|
||||||
//need to revisit this sometime and look into only resetting only the necesary items to let P25 switch between signals (C4FM or Wide) without needing a restart
|
//need to revisit this sometime and look into only resetting only the necesary items to let P25 switch between signals (C4FM or Wide) without needing a restart
|
||||||
|
|
|
||||||
|
|
@ -786,10 +786,19 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
||||||
state->nxdn_last_rid = SourceUnitID & 0xFFFF; //only grab if CRC is okay
|
state->nxdn_last_rid = SourceUnitID & 0xFFFF; //only grab if CRC is okay
|
||||||
state->nxdn_last_tg = (DestinationID & 0xFFFF);
|
state->nxdn_last_tg = (DestinationID & 0xFFFF);
|
||||||
state->nxdn_key = (KeyID & 0xFF);
|
state->nxdn_key = (KeyID & 0xFF);
|
||||||
state->nxdn_cipher_type = CipherType;
|
state->nxdn_cipher_type = CipherType; //will this set to zero if no enc?
|
||||||
}
|
}
|
||||||
//fprintf(stderr, "(CRC OK) ");
|
//fprintf(stderr, "(CRC OK) ");
|
||||||
}
|
}
|
||||||
|
//set enc bit here so we can tell playSynthesizedVoice whether or not to play enc traffic
|
||||||
|
if (state->nxdn_cipher_type != 0)
|
||||||
|
{
|
||||||
|
state->dmr_encL = 1;
|
||||||
|
}
|
||||||
|
if (state->nxdn_cipher_type == 0)
|
||||||
|
{
|
||||||
|
state->dmr_encL = 0;
|
||||||
|
}
|
||||||
//fprintf(stderr, " (OK) - ");
|
//fprintf(stderr, " (OK) - ");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,17 @@ process_IMBE (dsd_opts* opts, dsd_state* state, int* status_count)
|
||||||
#ifdef TRACE_DSD
|
#ifdef TRACE_DSD
|
||||||
state->debug_prefix = '\0';
|
state->debug_prefix = '\0';
|
||||||
#endif
|
#endif
|
||||||
|
//check for enc, then always run below step and mute at the point of playing audio so we can still dump the frames
|
||||||
|
if (state->payload_algid != 0x80)
|
||||||
|
{
|
||||||
|
state->dmr_encL = 1;
|
||||||
|
}
|
||||||
|
if (state->payload_algid == 0x80)
|
||||||
|
{
|
||||||
|
state->dmr_encL = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (state->p25kid == 0 || opts->unmute_encrypted_p25 == 1)
|
if (1 == 1) //state->p25kid == 0 || opts->unmute_encrypted_p25 == 1
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
// Check for a non-standard c0 transmitted
|
// Check for a non-standard c0 transmitted
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue