mirror of https://github.com/lwvmobile/dsd-fme.git
DMR Stereo Tweak; Clear Stale Audio Buffers;
This commit is contained in:
parent
ecd3ec1c61
commit
c38423c251
|
|
@ -488,7 +488,7 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
|||
if (internalslot == 0 && opts->floating_point == 0 && opts->pulse_digi_rate_out == 8000)
|
||||
playSynthesizedVoiceSS3 (opts, state); //Short Stereo Mix 3v2
|
||||
|
||||
if (skipcount > 2) //after 2 consecutive data frames, drop back to getFrameSync and process with dmr_data_sync
|
||||
if (skipcount > 3) //after 3 onsecutive data frames, drop back to getFrameSync and process with dmr_data_sync (need one more in order to push last voice on slot 2 only voice)
|
||||
{
|
||||
//set tests to all good so we don't get a bogus/redundant voice error
|
||||
cach_err = 0;
|
||||
|
|
@ -516,6 +516,12 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
|||
if (opts->mbe_out_f != NULL) closeMbeOutFile (opts, state);
|
||||
if (opts->mbe_out_fR != NULL) closeMbeOutFileR (opts, state);
|
||||
|
||||
//clear out any stale audio storage buffers
|
||||
memset (state->f_l4, 0.1f, sizeof(state->f_l4));
|
||||
memset (state->f_r4, 0.1f, sizeof(state->f_r4));
|
||||
memset (state->s_l4, 0, sizeof(state->s_l4));
|
||||
memset (state->s_r4, 0, sizeof(state->s_r4));
|
||||
|
||||
//if we have a tact or emb err, then produce sync pattern/err message
|
||||
if (tact_okay != 1 || emb_ok != 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
|
||||
//TODO: Continue to work on AGF function for best gain/normalization
|
||||
|
||||
//TODO: Either clear out stale s_l4 and f_l4 buffers or push playback on them somehow (particularly DMR)
|
||||
//stale buffered audio may be present when playing voice in slot 2 but the last sample isn't played but
|
||||
//is later played when the DMR BS loop resumes on a new call in slot 1...may need to expand the BS loop to cover an extra tdma frame to force the push
|
||||
//or just clear the stale values upon exit of the BS loop
|
||||
|
||||
void agf (dsd_opts * opts, dsd_state * state, float samp[160], int slot)
|
||||
{
|
||||
int i, run;
|
||||
|
|
|
|||
Loading…
Reference in New Issue