Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: retroyoda on April 16, 2009, 06:53:11 pm

Title: AdvanceMAME/MAME audio pitch question
Post by: retroyoda on April 16, 2009, 06:53:11 pm
Quick question : it appears that somewhere after AdvanceMAME version 0.80 the audio sync method has changed - if any frames are dropped the audio pitch now changes as it slows down and speeds up.
The problem with this is that I find it very noticeable when in-game music pitch changes slightly, and it also seems to happen occasionally even when the framerate seems steady.

I think it's preferable to have the audio just skip as it did in v0.80 and lower - does anyone know how to remove this annoying "pitch bending" effect?

I'm using AdvanceMAME, but I don't know if this problem applies to other versions of MAME too?

Many thanks.
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: tikbalang on April 16, 2009, 11:26:19 pm
it's a speed issue. use a lower samplerate.

sound_samplerate 22050 (or even 11025)

if using pc monitor:

device_video_clock 5-150 / 31.5 / 55-130

basically, optimize the rc files for performance and not eyecandy. upgrading the cpu and adding more memory is the best solution.
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: Ummon on April 19, 2009, 01:03:24 am
Yup. I suggest disabling services - or going back some versions. Usually such stuff means you don't have the resources at the time or at all.
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: retroyoda on April 20, 2009, 01:14:07 pm
Hi, thanks for the replies.
I've investigated a bit more, and it seems to be a peculiarity which is unique to AdvanceMAME, the Windows version just skips as normal.

I'm running a 3GHz P4 with 2GB of RAM, and it's the DOS version of AdvanceMAME so not much scope for upgrading or optimising for more speed. BTW the game in question is Ghouls'n' Ghosts - I noticed the music going out of tune slightly on the latter half of the first level.

I've also found that version 0.80 is fine - v0.80 has the usual form of audio skipping (clipping), whereas v0.90 has the form of audio interpolation that's annoying me, and has the music going out of tune in Ghouls'n'Ghosts. Later versions of AdvanceMAME are no different, bar V0.101 which introduces some video glitching. Nice.

So, somewhere in between v0.80 and 0.90 of AdvanceMAME, the audio sync method changes. Does anyone know what I'm looking for in the advmame.rc file in order to revert to the original form of audio syncing? Is it even possible?

Many thanks in advance, and thanks for the replies so far.
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: Ummon on April 20, 2009, 04:14:57 pm
My system is a 2.8 P4 and it runs GnG just fine via Win Adv .104 .
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: tikbalang on April 21, 2009, 12:15:39 am
i have a p3 1ghz/384mb ram and i run most games with no problems using advmame .106.1 DOS version.

here are my sound settings:

Code: [Select]
sound_adjust auto
sound_equalizer_highvolume 0
sound_equalizer_lowvolume 0
sound_equalizer_midvolume 0
sound_latency 0.1
sound_mode stereo
sound_normalize no
sound_samplerate 22050
sound_samples yes
sound_volume 0

just review the "sound_*" options in the docfiles.

have you tried the clock settings i posted above? using higher that VGA settings results in video scaling casing slowdowns.

what dos are you using? use msdos 7.10 from win9x. older versions are capable of only seeing 64mb ram with their himem.sys.

what soundcard are you using? does it work fine with other apps/games?
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: retroyoda on April 22, 2009, 01:23:38 pm
Thanks for that, i'll try those settings this evening.
It's a Soundblaster Live card, haven't tried any apps other than AdvanceMAME 0.80 which is absolutely perfect, but doesn't run some of the newer games that I want to play.

I'm also using an RGB television, so no fancy hires modes.
And it's MSDOS from Win98, but I'll check the himem.sys version anyway.

I'll post back with the results.

EDIT: As an aside, are there any tips for reducing loading times in DOS? I've copied a full set of MAME0.120 roms into a single folder, and it takes FOREVER when loading a game, and I can hear the poor drive grinding away the whole time. I'm already using SMARTDRV, but will test it this evening using a larger cache.Thanks!
Title: Re: AdvanceMAME/MAME audio pitch question
Post by: retroyoda on April 22, 2009, 02:19:52 pm
All sorted.
I used the sound settings above which helped, but I also found that changing the audio_resample option to "emulation" instead of "auto" got rid of the pitch bending effect.

I also found that I had an error in my SMARTDRV path so it wasn't loading, which is why my loading times were so abysmal...  ::)

Many thanks for the help!