I got an Intel Core i3-2120 based system running the integrated graphics and sound and that seems to have totally fixed the audio stuttering that I was seeing before:

According to Ubuntu's System Information:
Processor: Intel® Core™ i3-2120 CPU @ 3.30GHz × 4 (2 cores with hyperthreading)
Graphics: Intel® Sandybridge Desktop

I took the hard drive of my original Ubuntu 17.04 system, made an image with dd and copied that to the new system so it's the exact same system running on different hardware.

I hear no popping at all unless I fiddle with the bgfx video filter sliders and get to the slow ones.

On this computer, the onboard Intel audio works fine and I don't get pops even with the -video soft.

Code

./mame64 apple2e  -sdlvideofps -video bgfx  -prescale 2
  0.02s,    1 F, avrg game: 59.75 FPS 16.74 ms/f, avrg video: 1561.91 FPS 0.64 ms/f, last video:   inf FPS 0.36 ms/f
  1.03s,   62 F, avrg game: 60.00 FPS 16.67 ms/f, avrg video: 3662.88 FPS 0.27 ms/f, last video:   inf FPS 0.28 ms/f
  2.05s,  123 F, avrg game: 60.00 FPS 16.67 ms/f, avrg video: 3540.34 FPS 0.28 ms/f, last video:   inf FPS 0.33 ms/f


./mame64 apple2e -sdlvideofps -video opengl -prescale 2
  0.02s,    1 F, avrg game: 60.02 FPS 16.66 ms/f, avrg video: 487.59 FPS 2.05 ms/f, last video:   inf FPS 1.01 ms/f
  1.03s,   62 F, avrg game: 60.00 FPS 16.67 ms/f, avrg video: 821.80 FPS 1.22 ms/f, last video:   inf FPS 1.01 ms/f
  2.05s,  123 F, avrg game: 60.00 FPS 16.67 ms/f, avrg video: 814.30 FPS 1.23 ms/f, last video:   inf FPS 1.08 ms/f
 

./mame64 apple2e -sdlvideofps -video soft -prescale 2
  0.02s,    1 F, avrg game: 61.71 FPS 16.21 ms/f, avrg video: 77.32 FPS 12.93 ms/f, last video:   inf FPS 6.24 ms/f
  1.03s,   62 F, avrg game: 60.05 FPS 16.65 ms/f, avrg video: 152.53 FPS 6.56 ms/f, last video:   inf FPS 5.82 ms/f
  2.03s,  122 F, avrg game: 60.00 FPS 16.67 ms/f, avrg video: 151.10 FPS 6.62 ms/f, last video:   inf FPS 6.66 ms/f

Are those bgfx numbers for real? 3662 FPS?

So I did learn a couple of things:

Onboard video can be faster than a discrete card. (really!)

You can change the audio driver with:

export SDL_AUDIODRIVER=pulseaudio
export SDL_AUDIODRIVER=alsa

and -frameskip 6 will do exactly 30 FPS if you're into 30 fps video:

I pulled the usb audio device and put it on the new system and the pops are back. So I'm going to blame it on the usb sound dongle.

I feel like widlarizing that thing.