Audio becomes distorted after some time

Hi, I am using the latest version build d626322 (1.2e) and now after some time audio starts to become distorted.
I have an excerpt in a 48 kb/s MP3 attached where the CW-note went from normal to distorted. I recorded it with Audacity but first found out while running wfview with wsjt-x. Toi be sure that neither wsjt-x or Audacity could be to blame. I ran wfview on it’s own with no extra apps needing audio output. The result was still the same, initially good but became distorted. I tried different audio output settings, sample rates and latencies but it remains happening now.
OS= Linux Mint (Mate-desktop) 20.04.3 LTS. Built wfview with the latest script and created new .conf. The .log is actually the audio file. For the moment, I have no – debug log file. I will post that when I have one. When looking at the sound settings I notice that the Alsa plugin of WFview starts flashing. I use pulse as audio setting in WFview.
RX=R8600 and connection over LAN.
73 Peter - PA0PJE
wfview-distorted_mp3.log (749.1 KB)

Hi Peter.

Have you tried RT Audio as that was specifically added due to issues with QT Audio on certain Linux distributions? You can select from QT Audio, RT Audio or PortAudio using the combobox to the right of the audio device comboboxes.

73 Phil M0VSE

Hi Phil,

No, but I do now…
I was lucky it occurred again while running --debug and when the problem started again I saw lots of messages:

ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred

in the terminal.
Switching to RTaudio does nothing, no audio, but PortAudio does.
I’ll keep an eye on this, thanks for your quick answer.
73, Peter - PA0PJE

Ah, RT Audio switches also to an HDMI audio device in my video card, which is disabled in the OS. With RT Audio you also need the Audio Input and Output device set to “Default”. At least this is true for my PC… and disconnect first :slight_smile:
No glitches heard any more.

Hi Peter.

That’s good! Rt Audio “should” work but I have found that the audio device names can be slightly different with the different audio APIs, so you may need to re-select the audio devices once you have changed API.

73 Phil

Hi Phil,
I installed a new beta release of Mint 21 which is in fact Ubuntu 22.04. I notice that after installing wfview from the script the program runs OK, I have audio with QT audio and with PortAudio, be it with cracks and rumbles but on selecting RT audio the only choice I have for audio input and output is hw:HDA Intel MID.0. In Mint 20 the “default” setting is available but in Ubuntu Jelly and Mint 21 it is not, hence no audio at all… Any idea where to look? I checked that librtaudio-dev and librtaudio6 are installed. The installs were fresh, no old settings data used.

73 Peter - PA0PJE

Meanwhile it works, but I have to find out why installing VLC changed that…

Hi Peter.

It’s difficult to say, with there being so many different Linux distributions/versions and lots of different types of audio hardware, it is almost impossible to diagnose any issues without having the exact same hardware/software combination. On my Linux test machine (old MacBook Pro running Ubuntu 18.04) everything works pretty well with all three audio APIs. If you didn’t have librtaudio then it wouldn’t compile :slight_smile:

I have had issues with some machines glitching due to sample rate conversion so you could check what actual sample rate is being used by looking in /tmp/wfview.log. You should see lines that begin ‘Starting audioconverter:’

INF audioconverter: Starting audioConverter() Input: 1 Channels of "audio/pcm" 48000 SignedInt 16 Output: 2 Channels of "audio/pcm" 48000 SignedInt 16

These will tell you if wfview is performing sample rate or some other conversion. One is created for TX and one for RX audio.

73 Phil M0VSE