@JoeViking245
I'm very sorry for the misunderstanding. I did not verify the version of MAME I earlier downloaded when posting, because it was not downloaded from the official GitHub (we usually have restricted access to GitHub here). Just checked, it's a very old version, 0.210.
So I managed to download 0.278 from the MAME GitHub repository, then ran it, and indeed there was no sound (it's strange why the version downloaded by LaunchBox has sound, and it also always outputs to the speaker).
For comparison, I downloaded 0.277, and this version runs with correct sound output. I plan to temporarily configure this version in LaunchBox as the MAME runtime environment.
Thank you for bringing the post about the audio issue in version 0.278 to my attention, which gave me the idea to solve the problem.