Fix Upsampling

Fix Upsampling
--upsample audio on all input types to the proper output rate required for mono and stereo output.
--Allows for 48000/1 or 24000/2 output when using RTL or STDIN input
--MBE file playback still at 8000 due to random crackling when upscaled
--WAV file still recorded at 8000 mono
--MBE file saving and WAV saving disabled when using the -T Stereo TDMA option until both can be reworked.
This commit is contained in:
lwvmobile
2022-05-03 15:48:15 -04:00
committed by GitHub
parent 4c3a3e0959
commit 02a27111d3
3 changed files with 18 additions and 16 deletions

View File

@@ -156,7 +156,8 @@ processAudio (dsd_opts * opts, dsd_state * state)
// copy audio data to output buffer and upsample if necessary
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
if (opts->split == 0)
//the only time we don't want to upsample is when playing back MBE files, upsampling them seems to cause random crackling
if (opts->playfiles == 0) //opts->split == 0
{
for (n = 0; n < 160; n++)
{
@@ -295,7 +296,8 @@ processAudioR (dsd_opts * opts, dsd_state * state)
// copy audio data to output buffer and upsample if necessary
state->audio_out_temp_buf_pR = state->audio_out_temp_bufR;
if (opts->split == 0) //shouldn't need splitR
//the only time we don't want to upsample is when playing back MBE files, upsampling them seems to cause random crackling
if (opts->playfiles == 0) //opts->split == 0
{
for (n = 0; n < 160; n++)
{