mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 21:25:40 -05:00
DMR Stereo Internal Sync Tweaks; OCD Tweaks;
This commit is contained in:
29
src/dmr_bs.c
29
src/dmr_bs.c
@@ -285,10 +285,12 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
if (internalslot == 0)
|
||||
{
|
||||
vc1 = 1;
|
||||
state->DMRvcL = 0; //reset here if internal sync forces reset
|
||||
}
|
||||
if (internalslot == 1)
|
||||
{
|
||||
vc2 = 1;
|
||||
state->DMRvcR = 0; //reset here if internal sync forces reset
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,6 +352,17 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
goto SKIP;
|
||||
}
|
||||
|
||||
//extra check to see if we have missed a voice/data frame sync at this point and then exit if required
|
||||
if (opts->aggressive_framesync == 1)
|
||||
{
|
||||
//extremely aggressive
|
||||
if ( vc1 > 7 || vc2 > 7 )
|
||||
{
|
||||
goto END;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//only play voice on no data sync
|
||||
if (strcmp (sync, DMR_BS_DATA_SYNC) != 0)
|
||||
{
|
||||
@@ -563,22 +576,6 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
goto END;
|
||||
}
|
||||
//using these conditions may cause excessive resyncs IF bad signal,
|
||||
//but still better than getting stuck in a wonk wonk loop for too long.
|
||||
//set for more aggressive or less aggressive resync during accumulated playback errs
|
||||
if (opts->aggressive_framesync == 1)
|
||||
{
|
||||
//errors caused due to playing MBE files out of sync, break loop
|
||||
if (state->errs > 2 || state->errsR > 2)
|
||||
{
|
||||
//goto END; //
|
||||
}
|
||||
//errors caused due to playing MBE files out of sync, break loop
|
||||
if (state->errs2 > 4 || state->errs2R > 4)
|
||||
{
|
||||
goto END; //
|
||||
}
|
||||
}
|
||||
|
||||
//earlier skip conditions teleport us here to process further skip conditions before restarting while loop
|
||||
SKIP:
|
||||
|
||||
@@ -272,12 +272,14 @@ void dmrMS (dsd_opts * opts, dsd_state * state)
|
||||
if (internalslot == 0)
|
||||
{
|
||||
vc1 = 1;
|
||||
state->DMRvcL = 0; //reset here if jitter/sync forces reset
|
||||
fprintf (stderr, "MS Slot 1 Voice Sync \n");
|
||||
}
|
||||
|
||||
if (internalslot == 1)
|
||||
{
|
||||
vc2 = 1;
|
||||
state->DMRvcR = 0; //reset here if jitter/sync forces reset
|
||||
}
|
||||
|
||||
state->dmr_ms_mode = 1; //set to 1 here??
|
||||
|
||||
@@ -313,9 +313,9 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
}
|
||||
|
||||
//sanity check
|
||||
if (state->DMRvcL > 18)
|
||||
if (state->DMRvcL > 17) //18
|
||||
{
|
||||
state->DMRvcL = 18;
|
||||
state->DMRvcL = 17; //18
|
||||
}
|
||||
|
||||
pos = state->DMRvcL * 49;
|
||||
@@ -408,9 +408,9 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
}
|
||||
|
||||
//sanity check
|
||||
if (state->DMRvcR > 18)
|
||||
if (state->DMRvcR > 17) //18
|
||||
{
|
||||
state->DMRvcR = 18;
|
||||
state->DMRvcR = 17; //18
|
||||
}
|
||||
|
||||
pos = state->DMRvcR * 49;
|
||||
|
||||
Reference in New Issue
Block a user