mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 13:15:40 -05:00
Misc Audio2/Frame Tweaks;
This commit is contained in:
16
src/dmr_bs.c
16
src/dmr_bs.c
@@ -483,9 +483,9 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
//both working now, will need support added for ENC audio and no key
|
//both working now, will need support added for ENC audio and no key
|
||||||
//NOTE: We want this to play regardless of whether the slot is voice or data, to play silence in one slot and voice in the second, or voices in both
|
//NOTE: We want this to play regardless of whether the slot is voice or data, to play silence in one slot and voice in the second, or voices in both
|
||||||
if (internalslot == 0 && opts->floating_point == 1 && opts->pulse_digi_rate_out == 8000)
|
if (internalslot == 1 && opts->floating_point == 1 && opts->pulse_digi_rate_out == 8000)
|
||||||
playSynthesizedVoiceFS3 (opts, state); //Float Stereo Mix 3v2
|
playSynthesizedVoiceFS3 (opts, state); //Float Stereo Mix 3v2
|
||||||
if (internalslot == 0 && opts->floating_point == 0 && opts->pulse_digi_rate_out == 8000)
|
if (internalslot == 1 && opts->floating_point == 0 && opts->pulse_digi_rate_out == 8000)
|
||||||
playSynthesizedVoiceSS3 (opts, state); //Short Stereo Mix 3v2
|
playSynthesizedVoiceSS3 (opts, state); //Short Stereo Mix 3v2
|
||||||
|
|
||||||
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)
|
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)
|
||||||
@@ -788,12 +788,14 @@ void dmrBSBootstrap (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
memcpy(state->f_l4[0], state->audio_out_temp_buf, sizeof(state->audio_out_temp_buf));
|
memcpy(state->f_l4[0], state->audio_out_temp_buf, sizeof(state->audio_out_temp_buf));
|
||||||
memcpy(state->s_l4[0], state->s_l, sizeof(state->s_l));
|
memcpy(state->s_l4[0], state->s_l, sizeof(state->s_l));
|
||||||
|
memcpy(state->s_l4u[0], state->s_lu, sizeof(state->s_lu));
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(state->f_r4[0], state->audio_out_temp_bufR, sizeof(state->audio_out_temp_bufR));
|
memcpy(state->f_r4[0], state->audio_out_temp_bufR, sizeof(state->audio_out_temp_bufR));
|
||||||
memcpy(state->s_r4[0], state->s_r, sizeof(state->s_r));
|
memcpy(state->s_r4[0], state->s_r, sizeof(state->s_r));
|
||||||
|
memcpy(state->s_r4u[0], state->s_ru, sizeof(state->s_ru));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -802,12 +804,14 @@ void dmrBSBootstrap (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
memcpy(state->f_l4[1], state->audio_out_temp_buf, sizeof(state->audio_out_temp_buf));
|
memcpy(state->f_l4[1], state->audio_out_temp_buf, sizeof(state->audio_out_temp_buf));
|
||||||
memcpy(state->s_l4[1], state->s_l, sizeof(state->s_l));
|
memcpy(state->s_l4[1], state->s_l, sizeof(state->s_l));
|
||||||
|
memcpy(state->s_l4u[1], state->s_lu, sizeof(state->s_lu));
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(state->f_r4[1], state->audio_out_temp_bufR, sizeof(state->audio_out_temp_bufR));
|
memcpy(state->f_r4[1], state->audio_out_temp_bufR, sizeof(state->audio_out_temp_bufR));
|
||||||
memcpy(state->s_r4[1], state->s_r, sizeof(state->s_r));
|
memcpy(state->s_r4[1], state->s_r, sizeof(state->s_r));
|
||||||
|
memcpy(state->s_r4u[1], state->s_ru, sizeof(state->s_ru));
|
||||||
}
|
}
|
||||||
|
|
||||||
processMbeFrame (opts, state, NULL, ambe_fr3, NULL);
|
processMbeFrame (opts, state, NULL, ambe_fr3, NULL);
|
||||||
@@ -815,12 +819,14 @@ void dmrBSBootstrap (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
memcpy(state->f_l4[2], state->audio_out_temp_buf, sizeof(state->audio_out_temp_buf));
|
memcpy(state->f_l4[2], state->audio_out_temp_buf, sizeof(state->audio_out_temp_buf));
|
||||||
memcpy(state->s_l4[2], state->s_l, sizeof(state->s_l));
|
memcpy(state->s_l4[2], state->s_l, sizeof(state->s_l));
|
||||||
|
memcpy(state->s_l4u[2], state->s_lu, sizeof(state->s_lu));
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(state->f_r4[2], state->audio_out_temp_bufR, sizeof(state->audio_out_temp_bufR));
|
memcpy(state->f_r4[2], state->audio_out_temp_bufR, sizeof(state->audio_out_temp_bufR));
|
||||||
memcpy(state->s_r4[2], state->s_r, sizeof(state->s_r));
|
memcpy(state->s_r4[2], state->s_r, sizeof(state->s_r));
|
||||||
|
memcpy(state->s_r4u[2], state->s_ru, sizeof(state->s_ru));
|
||||||
}
|
}
|
||||||
|
|
||||||
//collect the mi fragment
|
//collect the mi fragment
|
||||||
@@ -832,10 +838,10 @@ void dmrBSBootstrap (dsd_opts * opts, dsd_state * state)
|
|||||||
//update voice sync time for trunking purposes (particularly Con+)
|
//update voice sync time for trunking purposes (particularly Con+)
|
||||||
if (opts->p25_is_tuned == 1) state->last_vc_sync_time = time(NULL);
|
if (opts->p25_is_tuned == 1) state->last_vc_sync_time = time(NULL);
|
||||||
|
|
||||||
//NOTE: Only play on slot 0, if slot 1, then it'll play after the next TDMA frame in the BS loop instead
|
//NOTE: Only play on slot 1, if slot 0, then it'll play after the next TDMA frame in the BS loop instead
|
||||||
if (internalslot == 0 && opts->floating_point == 1 && opts->pulse_digi_rate_out == 8000)
|
if (internalslot == 1 && opts->floating_point == 1 && opts->pulse_digi_rate_out == 8000)
|
||||||
playSynthesizedVoiceFS3 (opts, state); //Float Stereo Mix 3v2
|
playSynthesizedVoiceFS3 (opts, state); //Float Stereo Mix 3v2
|
||||||
if (internalslot == 0 && opts->floating_point == 0 && opts->pulse_digi_rate_out == 8000)
|
if (internalslot == 1 && opts->floating_point == 0 && opts->pulse_digi_rate_out == 8000)
|
||||||
playSynthesizedVoiceSS3 (opts, state); //Short Stereo Mix 3v2
|
playSynthesizedVoiceSS3 (opts, state); //Short Stereo Mix 3v2
|
||||||
|
|
||||||
dmrBS (opts, state); //bootstrap into full TDMA frame for BS mode
|
dmrBS (opts, state); //bootstrap into full TDMA frame for BS mode
|
||||||
|
|||||||
@@ -1366,6 +1366,11 @@ liveScanner (dsd_opts * opts, dsd_state * state)
|
|||||||
if (opts->audio_gain > 50.0f) opts->audio_gain = 50.0f;
|
if (opts->audio_gain > 50.0f) opts->audio_gain = 50.0f;
|
||||||
if (opts->audio_gain < 0.0f) opts->audio_gain = 0.0f;
|
if (opts->audio_gain < 0.0f) opts->audio_gain = 0.0f;
|
||||||
}
|
}
|
||||||
|
else if (opts->audio_gain == 0)
|
||||||
|
{
|
||||||
|
state->aout_gain = 15.0f;
|
||||||
|
state->aout_gainR = 15.0f;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef USE_RTLSDR
|
#ifdef USE_RTLSDR
|
||||||
if(opts->audio_in_type == 3)
|
if(opts->audio_in_type == 3)
|
||||||
|
|||||||
@@ -941,6 +941,10 @@ void process_P2_DUID (dsd_opts * opts, dsd_state * state)
|
|||||||
//add 360 bits to each counter
|
//add 360 bits to each counter
|
||||||
vc_counter = vc_counter + 360;
|
vc_counter = vc_counter + 360;
|
||||||
|
|
||||||
|
//debug enable both slots before playback
|
||||||
|
// opts->slot1_on = 1;
|
||||||
|
// opts->slot2_on = 1;
|
||||||
|
|
||||||
//NOTE: Could be an issue if MAC_SIGNAL onn LCH 1 and voice in LCH 0? It might Stutter?
|
//NOTE: Could be an issue if MAC_SIGNAL onn LCH 1 and voice in LCH 0? It might Stutter?
|
||||||
if (sacch == 0 && ts_counter & 1 && opts->floating_point == 1 && opts->pulse_digi_rate_out == 8000)
|
if (sacch == 0 && ts_counter & 1 && opts->floating_point == 1 && opts->pulse_digi_rate_out == 8000)
|
||||||
playSynthesizedVoiceFS4 (opts, state);
|
playSynthesizedVoiceFS4 (opts, state);
|
||||||
|
|||||||
Reference in New Issue
Block a user