What I do, which is far simplier to manage, is to run mame in a windowed mode while windows sound recorder is up at the same time. When the sound effect I need is about to be played I pause the game, switch over to the recorder, start recording, unpause and then switch back and save the wav file. It makes for far more effecient editing later.