DMR Stereo Inversion Handling

DMR Stereo Inversion Handling
--Fix frame sync not forwarding inverted signal to DMR Stereo methods
--Other Misc Bug Fixes
This commit is contained in:
lwvmobile
2022-05-12 11:25:41 -04:00
committed by GitHub
parent 2263ddae63
commit 7d6c3dc67c
5 changed files with 131 additions and 143 deletions

View File

@@ -687,7 +687,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
state->min = ((state->min) + lmin) / 2;
//state->directmode = 0;
//fprintf (stderr, "DMR MS Data");
if (0 == 0) //opts->inverted_dmr
if (opts->inverted_dmr == 0) //opts->inverted_dmr
{
// data frame
sprintf(state->ftype, "DMR MS");
@@ -706,6 +706,16 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
}
return (33); //33
}
else //inverted MS voice frame
{
sprintf(state->ftype, "DMR MS");
state->lastsynctype = 32;
if ( opts->monitor_input_audio == 1)
{
pa_simple_flush(opts->pulse_raw_dev_out, NULL);
}
return (32);
}
}
//not sure if this should be here, RC data should only be present in vc6?
if(strcmp (synctest, DMR_RC_DATA_SYNC) == 0)
@@ -746,7 +756,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
state->min = ((state->min) + lmin) / 2;
//state->directmode = 0;
//fprintf (stderr, "DMR MS VOICE\n");
if (0 == 0) //opts->inverted_dmr
if (opts->inverted_dmr == 0) //opts->inverted_dmr
{
// voice frame
sprintf(state->ftype, "DMR MS");
@@ -765,6 +775,17 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
}
return (32);
}
else //inverted MS data frame
{
sprintf(state->ftype, "DMR MS");
state->lastsynctype = 33;
if ( opts->monitor_input_audio == 1)
{
pa_simple_flush(opts->pulse_raw_dev_out, NULL);
}
return (33);
}
}
//if ((strcmp (synctest, DMR_MS_DATA_SYNC) == 0) || (strcmp (synctest, DMR_BS_DATA_SYNC) == 0))
@@ -794,7 +815,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
{
// inverted voice frame
sprintf(state->ftype, "DMR ");
if (opts->errorbars == 1)
if (opts->errorbars == 1 && opts->dmr_stereo == 0)
{
printFrameSync (opts, state, "-DMR ", synctest_pos + 1, modulation);
}
@@ -928,7 +949,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
{
// inverted data frame
sprintf(state->ftype, "DMR ");
if (opts->errorbars == 1 && opts->dmr_stereo == 0)
if (opts->errorbars == 1) //&& opts->dmr_stereo == 0
{
printFrameSync (opts, state, "-DMR ", synctest_pos + 1, modulation);
}