[Scummvm-devel] Reduced audio buffer in SDL backend

Max Horn max at quendi.de
Sat May 24 21:18:23 CEST 2008


Hi there,

the MT-32 emulator has never been working very well on Intel macs, due  
to the way audio works on Mac OS X. Anyway, it turns out that a simple  
workaround is to reduce the size of the SDL audio buffer. The  
following patch makes the MT-32 emu work fine on my MacBook Pro.  
Essentially, it reduces the audio buffer size from 2048 to 256 bytes  
(for the default output rate of 22050 Hz).

However, this could very well break other systems, esp. slower  
machines. I wonder whether I should just commit it as is, and wait for  
complaints, or whether to defensively make this MACOSX-only (and then  
wait for outcries, too, but probably much later, like e.g. after the  
next release).

As an added bonus, a smaller audio buffer would also increase the  
accuracy of Mixer::getSoundElapsedTime(). But again, this might very  
well stress slower machines overly much. So testing is required...

Bye,
Max

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdl-small-audiobuffer.patch
Type: application/octet-stream
Size: 766 bytes
Desc: not available
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20080524/189e8039/attachment.obj>
-------------- next part --------------



More information about the Scummvm-devel mailing list