mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-17 11:17:22 -05:00
Tweak Toggle Voice Synthesis for FDMA Sources;
This commit is contained in:
@@ -456,6 +456,19 @@ playSynthesizedVoice (dsd_opts * opts, dsd_state * state)
|
||||
ssize_t result;
|
||||
UNUSED(result);
|
||||
|
||||
//don't synthesize voice if slot is turned off
|
||||
if (opts->slot1_on == 0)
|
||||
{
|
||||
//clear any previously buffered audio
|
||||
state->audio_out_float_buf_p = state->audio_out_float_buf + 100;
|
||||
state->audio_out_buf_p = state->audio_out_buf + 100;
|
||||
memset (state->audio_out_float_buf, 0, 100 * sizeof (float));
|
||||
memset (state->audio_out_buf, 0, 100 * sizeof (short));
|
||||
state->audio_out_idx2 = 0;
|
||||
state->audio_out_idx = 0;
|
||||
goto end_psv;
|
||||
}
|
||||
|
||||
if (state->audio_out_idx > opts->delay)
|
||||
{
|
||||
if (opts->audio_out_type == 5) //OSS
|
||||
@@ -474,6 +487,8 @@ playSynthesizedVoice (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
}
|
||||
|
||||
end_psv:
|
||||
|
||||
if (state->audio_out_idx2 >= 800000)
|
||||
{
|
||||
state->audio_out_float_buf_p = state->audio_out_float_buf + 100;
|
||||
|
||||
Reference in New Issue
Block a user