I am trying to use mt32 sound on Mac OS X. I have put the MT32_Control.ROM and MT32_PCM.ROM in the games directory. When I start the game is builds the sound cache. When the game plays (I have tried Sam and Max and Day of the Tenticle) the music has a very serious stutter and sometimes the voices and other sounds don't play at all. If I switch from the mt32 to default, all is well. I have used these same .ROM files with dosbox and it works perfectly. I tried these on 0.10.0 and 0.11.0svn and get the same effect. Is there something I am doing wrong?
Thanks
Brian
MT32 Stutter on Mac OS X
Moderator: ScummVM Team
- Vinterstum
- ScummVM Developer
- Posts: 580
- Joined: Sun Oct 16, 2005 6:59 am
oh
Well thats strange. I patched dosbox and use the scummvm m32emu code to build it and the shared lib. It sounds perfect and seems to work very well. I wonder why it works so badly in scummvm. If there is anything I can do to help test a fix I would love to help.
Thanks
-Brian
Thanks
-Brian
Hello everyone,
I too was frustrated when I found out that the mt32 emu stutters on my mac. A quick browse through the source code revealed a way to do a quick'n dirty fix: in OSystem_SDL::setSoundCallback(...) make the buffer length bigger, essentially by modifying
to
This bigger buffer fixed the stutter at least for me (Intel MacBook 1.8GHz Os X 10.4.10). I only tested it in Fate of Atlantis, though.
It's also not necessarily a proper fix for the problem, since it does increase the sound latency, but anyway, it's a fix for those who are daring enough to compile their own version Perhaps the buffer size could be made into to a config option for the official version?
Cheers,
Timo
Edit: making the buffer 10 times longer might be a bit of overkill...
Edit 2: oops, I just realized that I decreased the buffer length, and that seemed to fix the problem
I too was frustrated when I found out that the mt32 emu stutters on my mac. A quick browse through the source code revealed a way to do a quick'n dirty fix: in OSystem_SDL::setSoundCallback(...) make the buffer length bigger, essentially by modifying
Code: Select all
for (;;) {
if ((1000 * samples) / _samplesPerSec < 100)
break;
samples >>= 1;
Code: Select all
for (;;) {
if ((1000 * samples) / _samplesPerSec < 10)
break;
samples >>= 1;
It's also not necessarily a proper fix for the problem, since it does increase the sound latency, but anyway, it's a fix for those who are daring enough to compile their own version Perhaps the buffer size could be made into to a config option for the official version?
Cheers,
Timo
Edit: making the buffer 10 times longer might be a bit of overkill...
Edit 2: oops, I just realized that I decreased the buffer length, and that seemed to fix the problem