So I wanted to see what kind of waveforms were being generated by mame audio. With ubuntu, I had to use pavucontrol to select the monitor of Built-in audio to get the system-generated sound for Audacity to record.

[Linked Image from i.imgur.com]



I did discover something interesting, that the 1-bit DAC was generating a signal when it wasn't actually doing anything. I suppose this is correct behavior, but it does answer why I am always hearing pops and crackles. When there's an audio dropout, the waveform drops to zero and there's a "click" sound.


The dac corresponds to this code:
Code

   /* audio hardware */
        SPEAKER(config, "speaker").front_center();
        DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
        voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
        vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);




Lowering the volume slider to zero for the 1 bit DAC makes the clicking disappear and the VU meters go down to no signal.

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]


If you look at the recorded waveform, there's no actual sound being played, there's just a bunch of "dropouts" where other tasks are grabbing the cpu (probably because I'm doing a bunch of printf's)

Audacity's monitor shows -46 db on the VU meter.

[Linked Image from i.imgur.com]


It's interesting when I have the mockingboard enabled as there are multiple outputs which can contribute to the clicking.
If you change the volume on the different channel volumes, the biasing can constructively and destructively interfere and audacity's VU meters will go up and down.