Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
07704 Sound Minor Always Jul 12, 2020, 04:09 Jul 12, 2020, 18:49
Tester Andrew View Status Public Platform MAME (Official Binary)
Assigned To Resolution No change required OS Windows 10 (64-bit)
Status [?] Closed Driver
Version 0.222 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 07704: joust: Audio glitch when using portaudio and bgfx
Description A repetitive audio glitch can be heard soon after machine loads when using both portaudio and bgfx on the command line. It seems to affect machines in the williams driver (I checked joust and robotron) and nes driver (I checked smb1 and zeldau). The glitch is not heard with 0.204 and starts with 0.205.

command line:

mame64 joust -sound portaudio -video bgfx

joust in 0.204. I get the initial crackle whenever any machines loads. No audio glitches through the welcome screen.

Joust in 0.222. Audio glitch starts at 20 seconds in and repeats. Thump. Thump. Thump.

smb1 in 0.222. Glitch happens almost immediately. With 0.205 the glitch doesn't start until just before the Italian plumber jumps over the first sewer pipe.

Steps To Reproduce Launch machine with sound set to portaudio and video set to bgfx
Additional Information The audio glitch does not occur when portaudio or bgfx are used alone. Apologies for the cell phone video capture.
Github Commit
Regression Version 0.205
Affected Sets / Systems joust
Attached Files
There are no relationship linked to this issue.
User avatar
Jul 12, 2020, 15:14
I suspect it is because your output is flat 60hz and you are enforcing VSYNC of some type and both machines run ever so slightly FASTER than 60hz resulting in periodic frame drops and clicks. Video mode doesn't seem to matter in my quick testing.

Three suggestions:
1) Drop -waitvsync or any other video syncing command.
2) Use -refreshspeed. This will drop overall emulation speed to match that of what the monitor is expecting and capable to display which should smooth things out in exchange for very minor pitch/speed changes.
3) Use default sound for your platform or something other than portaudio.
User avatar
Jul 12, 2020, 18:28
Your suggestions prompted me to check my g-sync monitor refresh rate and it was set to 60hz. I increased it to my usual 144Hz and the audio glitches disappeared. Thanks for your help. This issue can be closed.
User avatar
Jul 12, 2020, 18:49
Very well. Glad you could get it resolved.