mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-13 09:17:20 -05:00
Fix dPMR, pV, and MBEplayback for new audio;
This commit is contained in:
@@ -477,6 +477,10 @@ void processdPMRvoice (dsd_opts * opts, dsd_state * state)
|
||||
for(i = start; i < end; i++)
|
||||
{
|
||||
processMbeFrame (opts, state, NULL, ambe_fr[i], NULL);
|
||||
if (opts->floating_point == 0)
|
||||
playSynthesizedVoice(opts, state);
|
||||
if (opts->floating_point == 1)
|
||||
playSynthesizedVoiceFM(opts, state);
|
||||
}
|
||||
|
||||
//set the correct sync type again and flag off the cipher
|
||||
|
||||
@@ -1546,6 +1546,7 @@ main (int argc, char **argv)
|
||||
case 'h':
|
||||
usage ();
|
||||
exit (0);
|
||||
break; //probably isn't required, but just making sure it doesn't do anything bizarre
|
||||
|
||||
case 'a':
|
||||
opts.call_alert = 1;
|
||||
@@ -2728,7 +2729,7 @@ main (int argc, char **argv)
|
||||
opts.playoffset = 0;
|
||||
opts.playoffsetR = 0;
|
||||
opts.delay = 0;
|
||||
opts.pulse_digi_rate_out = 48000;
|
||||
opts.pulse_digi_rate_out = 8000;
|
||||
opts.pulse_digi_out_channels = 1;
|
||||
if (opts.audio_out_type == 0) openPulseOutput(&opts);
|
||||
if (opts.audio_out_type == 5) openAudioOutDevice (&opts, SAMPLE_RATE_OUT);
|
||||
|
||||
@@ -123,7 +123,7 @@ void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv)
|
||||
{
|
||||
readImbe4400Data (opts, state, imbe_d);
|
||||
mbe_processImbe4400Dataf (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, imbe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
|
||||
if (opts->audio_out == 1)
|
||||
if (opts->audio_out == 1 && opts->floating_point == 0)
|
||||
{
|
||||
processAudio(opts, state);
|
||||
}
|
||||
@@ -132,10 +132,15 @@ void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv)
|
||||
writeSynthesizedVoice (opts, state);
|
||||
}
|
||||
|
||||
if (opts->audio_out == 1)
|
||||
if (opts->audio_out == 1 && opts->floating_point == 0)
|
||||
{
|
||||
playSynthesizedVoice (opts, state);
|
||||
}
|
||||
if (opts->floating_point == 1)
|
||||
{
|
||||
memcpy (state->f_l, state->audio_out_temp_buf, sizeof(state->f_l));
|
||||
playSynthesizedVoiceFM (opts, state);
|
||||
}
|
||||
}
|
||||
else if (state->mbe_file_type > 0) //ambe files
|
||||
{
|
||||
@@ -158,7 +163,7 @@ void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv)
|
||||
//dstar ambe
|
||||
if (state->mbe_file_type == 2) mbe_processAmbe2400Dataf (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, ambe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
|
||||
|
||||
if (opts->audio_out == 1)
|
||||
if (opts->audio_out == 1 && opts->floating_point == 0)
|
||||
{
|
||||
processAudio(opts, state);
|
||||
}
|
||||
@@ -166,10 +171,16 @@ void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv)
|
||||
{
|
||||
writeSynthesizedVoice (opts, state);
|
||||
}
|
||||
if (opts->audio_out == 1)
|
||||
|
||||
if (opts->audio_out == 1 && opts->floating_point == 0)
|
||||
{
|
||||
playSynthesizedVoice (opts, state);
|
||||
}
|
||||
if (opts->floating_point == 1)
|
||||
{
|
||||
memcpy (state->f_l, state->audio_out_temp_buf, sizeof(state->f_l));
|
||||
playSynthesizedVoiceFM (opts, state);
|
||||
}
|
||||
}
|
||||
if (exitflag == 1)
|
||||
{
|
||||
|
||||
@@ -213,7 +213,15 @@ void processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr1);
|
||||
if (opts->floating_point == 0)
|
||||
playSynthesizedVoice(opts, state);
|
||||
if (opts->floating_point == 1)
|
||||
playSynthesizedVoiceFM(opts, state);
|
||||
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr2);
|
||||
if (opts->floating_point == 0)
|
||||
playSynthesizedVoice(opts, state);
|
||||
if (opts->floating_point == 1)
|
||||
playSynthesizedVoiceFM(opts, state);
|
||||
|
||||
// spacer bits
|
||||
dibit = getDibit (opts, state);
|
||||
@@ -383,7 +391,15 @@ void processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr1);
|
||||
if (opts->floating_point == 0)
|
||||
playSynthesizedVoice(opts, state);
|
||||
if (opts->floating_point == 1)
|
||||
playSynthesizedVoiceFM(opts, state);
|
||||
processMbeFrame (opts, state, NULL, NULL, imbe7100_fr2);
|
||||
if (opts->floating_point == 0)
|
||||
playSynthesizedVoice(opts, state);
|
||||
if (opts->floating_point == 1)
|
||||
playSynthesizedVoiceFM(opts, state);
|
||||
|
||||
// spacer bits
|
||||
dibit = getDibit (opts, state);
|
||||
|
||||
Reference in New Issue
Block a user