From 1d30d5ec32e25b6d0fe1921d7db5322816e89538 Mon Sep 17 00:00:00 2001 From: lwvmobile <59371473+lwvmobile@users.noreply.github.com> Date: Thu, 19 May 2022 20:05:39 -0400 Subject: [PATCH] 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. --- src/dsd_main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dsd_main.c b/src/dsd_main.c index a51e86c..e69f751 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -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); }