[Scummvm-devel] Timidity in Scummvm?

yotam barnoy yotambarnoy at gmail.com
Mon May 3 07:27:34 CEST 2010


Hey guys

I've been looking at ways of optimizing the PSP's performance. While
not bad per se, we're currently running the PSP at maximum speed
(333Mhz) in order to handle things like FM synthesis, audio decoding
and movie decoding. I would like to improve the last two, but right
now I'm focused on the first -- FM synthesis -- which happens to take
the biggest chunk of time on my gprof printout.

It occurred to me that it may be possible to use basic
wavetable/sample-based synthesis instead of FM synthesis. This would
be a very good sounding option for portable platforms so long as they
have enough memory for the wave tables. Theoretically at least,
wavetable synthesis should use less CPU power than FM synthesis. My
thought is to take the same code SDL_Sound took -- timidity 0.2i --
and put it into Scummvm. This idea came from seeing other PSP homebrew
games that use this same code with very good performance. I'd need to
hook the code up to our audio system, and then I'd work on making the
code more efficient and perhaps add a few features from the more
advanced Timidity++ project.

Just to be clear, this is different from the current open source
wavetable solutions ScummVM offers: Timidity++ is very CPU-intensive
and ScummVM can only talk to it in client-server fashion which means
it's not an option for portable platforms, while FluidSynth AFAIK is
also heavy on CPU-usage and must be linked in as a separate library
which means we don't have the ability to make it lighter.

I have no idea if this idea would actually cut down CPU usage, but I'm
willing to give it a try, especially now that the PSP has a couple of
megabytes of free memory.

I'm open to (and hoping for) feedback --

Yotam




More information about the Scummvm-devel mailing list