I remember having a few issues with sound distortion and MAME32. I kept tweaking my settings and reading about how MAME works and what it requires as far as a certain config, and after that ... she started running pretty smooth.
Not to mention the fact I went from on-board sound to installing a new pci sound card. This helped alot as it wasn't putting such a strain on the CPU for MAME to operate.
Try lowering the sample-rate , to say 22050, and make sure your refresh rate is set properly. It takes some playing around with , but I'm sure you'll find a good config.
Below are some screens of the settings I'm currently using. I've been pretty happy with these, and they provide a nice gaming experience when using MAME32 on my main pc. These settings bring my PC and monitor down to 31KHz / 60 HZ , and all the games look and play great.
I hope this helps in your quest to eliminate the distortion.
GZ