First thing first, change your MAME exe with a more recent release. If your PC is low in spec, stick with MAME 0.106 (last release before the first main video handling rewrite... ages ago).
Glitchy sounds could be attributed to a too low CPU speed. GPU and RAM won't affect your PC emulaton performance, with MAME at least.