Fix Audio Gain/Device Out on MBE File Playback;

This commit is contained in:
lwvmobile
2023-01-15 18:12:15 -05:00
parent f5a7ab2b77
commit 7f9b852f36

View File

@@ -52,7 +52,7 @@ char * FM_banner[9] = {
" ██║ ██║ ╚═══██╗██║ ██║   ██╔══╝ ██║╚██╔╝██║██╔══╝ ", " ██║ ██║ ╚═══██╗██║ ██║   ██╔══╝ ██║╚██╔╝██║██╔══╝ ",
" ██████╔╝██████╔╝██████╔╝   ██║ ██║ ╚═╝ ██║███████╗", " ██████╔╝██████╔╝██████╔╝   ██║ ██║ ╚═╝ ██║███████╗",
" ╚═════╝ ╚═════╝ ╚═════╝    ╚═╝ ╚═╝ ╚═╝╚══════╝", " ╚═════╝ ╚═════╝ ╚═════╝    ╚═╝ ╚═╝ ╚═╝╚══════╝",
" 'Lite' Edition v2.0.0-10-gb2ccd3a Windows 32-bit RC2a " " 'Lite' Edition v2.0.0-10-gb2ccd3a Windows 32-bit RC2b "
}; };
int int
@@ -1047,6 +1047,7 @@ if (opts->audio_in_type == 0)
if (opts->audio_out_type == 0) if (opts->audio_out_type == 0)
{ {
// openPulseInput(opts); //test to see if we still randomly hang up in ncurses and tcp input if we open this and leave it opened
openPulseOutput(opts); openPulseOutput(opts);
} }
@@ -2338,13 +2339,13 @@ main (int argc, char **argv)
opts.playoffsetR = 0; opts.playoffsetR = 0;
opts.delay = 0; opts.delay = 0;
if (strlen(opts.wav_out_file) > 0 && opts.dmr_stereo_wav == 0) if (strlen(opts.wav_out_file) > 0 && opts.dmr_stereo_wav == 0)
{ {
openWavOutFile (&opts, &state); openWavOutFile (&opts, &state);
} }
else opts.pulse_digi_rate_out = 48000;
{ opts.pulse_digi_out_channels = 1;
openAudioOutDevice (&opts, SAMPLE_RATE_OUT); if (opts.audio_out_type == 0) openPulseOutput(&opts); //need to open it up for output?
} if (opts.audio_out_type == 5) openAudioOutDevice (&opts, SAMPLE_RATE_OUT);
} }
else if (strcmp (opts.audio_in_dev, opts.audio_out_dev) != 0) else if (strcmp (opts.audio_in_dev, opts.audio_out_dev) != 0)
@@ -2379,10 +2380,7 @@ main (int argc, char **argv)
if (opts.playfiles == 1) if (opts.playfiles == 1)
{ {
opts.pulse_digi_rate_out = 48000; state.aout_gain = 25; //BUGFIX: No audio output when playing back .amb/.imb files
opts.pulse_digi_out_channels = 1;
// openPulseOutput(&opts); //need to open it up for output?
openAudioInDevice (&opts); //needs to be tested, not sure if required
playMbeFiles (&opts, &state, argc, argv); playMbeFiles (&opts, &state, argc, argv);
} }