[Scummvm-devel] MPEG Changing Channel Count Midstream

Matthew Hoops clone2727 at gmail.com
Thu Aug 19 07:55:55 CEST 2010


Hi,

Last week, Julien (IRC: Littleboy) discovered that the DVD version of
Riven would crash with this assertion: "Assertion failed:
input.isStereo() == stereo, file sound/rate.cpp, line 286" for certain
sounds. Digging deeper into the problem, it seems that MPEG-1 sounds
(Layer II in this case) support doing changing the channel count
throughout the stream and that triggers the assertion.

Judging from the way the RateConverter is currently set up in ScummVM,
it doesn't seem too easy to be able to allow for this behavior. I
wrote up a quick and very hacky patch (which is attached) that
switches MP3Stream to always return true for isStereo() and then when
the current channel count is 1, just duplicate the sample for both
left and right. Does anyone have a better idea on how to do this or a
better suggestion of how to handle it?

Thanks,
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp3_channel_hack.diff
Type: application/octet-stream
Size: 1250 bytes
Desc: not available
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20100819/e0575b5f/attachment.obj>


More information about the Scummvm-devel mailing list