Fix Uninitialized Values

audio_in_type and audio_out_type were not initialized
--this caused issues with Raspberry Pi OS 64-bit, presumably others as well by not opening the audio output stream.
This commit is contained in:
lwvmobile 2022-05-19 20:05:39 -04:00 committed by GitHub
parent 710e76d0ab
commit 1d30d5ec32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -225,7 +225,10 @@ initOpts (dsd_opts * opts)
opts->inverted_dpmr = 0;
opts->dmr_stereo = 0;
opts->aggressive_framesync = 1; //more aggressive to combat wonk wonk voice decoding
//opts->audio_in_type = 0;
//see if initializing these values causes issues elsewhere, if so, then disable.
opts->audio_in_type = 0; //this was never initialized, causes issues on rPI 64 (bullseye) if not initialized
opts->audio_out_type = 0; //this was never initialized, causes issues on rPI 64 (bullseye) if not initialized
}
void
@ -563,10 +566,12 @@ if (opts->audio_in_type == 1)
open_rtlsdr_stream(opts);
}
#endif
if (opts->audio_in_type == 0){
if (opts->audio_in_type == 0)
{
openPulseInput(opts);
}
if (opts->audio_out_type == 0){
if (opts->audio_out_type == 0)
{
openPulseOutput(opts);
}