[Scummvm-devel] SCI midiparser

Willem Jan Palenstijn wjp at usecode.org
Sat Sep 21 01:17:12 CEST 2013


On Fri, Sep 20, 2013 at 03:44:39PM +0300, Filippos Karapetis wrote:
> The SCI music code has been based on Greg's SCI implementation (plus a lot
> of parts from FreeSCI itself).
> 
> Greg implemented the initial custom MidiParser (MidiParser_SCI), so the
> reason why everything is processed in parseNextEvent() is because Greg did
> it that way...
> 
> In retrospect, the best place for processing the signals should have been
> placed in sendToDriver() indeed, so IMHO, that's what should be done....

I've refactored the necessary code: https://github.com/scummvm/scummvm/pull/398 

I would appreciate extra testing, as it is quite possible that it breaks
things, but the scenes I tried that caused problems with signals and loop
timing in the past seem ok.

Any other feedback is of course also very welcome.

-Willem Jan




> On Fri, Sep 20, 2013 at 12:34 PM, Willem Jan Palenstijn <wjp at usecode.org>wrote:
> 
> > Hi all,
> >
> > This is a bit of an historical/design question:
> >
> > Is there any reason the SCI midiparser does processing of signals, cues,
> > loops
> > and such in the parseNextEvent() function instead of in the sendToDriver()
> > function?
> >
> > Putting that processing in the parseNextEvent means it gets done _before_
> > the
> > delay associated to the event, which means we now have all these hacks to
> > delay
> > things at the top of parseNextEvent.
> >
> > I was thinking of changing this, but it's a rather invasive change, so any
> > insights or historical perspective would be welcome.
> >
> > It may require putting the "META Event" processing from
> > MidiParser::onTimer in
> > a new virtual function to allow us to override it for SCI's looping
> > behaviour,
> > but that shouldn't be a problem.
> >
> >
> > -Willem Jan
> >
> >
> > ------------------------------------------------------------------------------
> > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> > SharePoint
> > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> > includes
> > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Scummvm-devel mailing list
> > Scummvm-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/scummvm-devel
> >
> 
> 
> 
> -- 
> "Experience is the name every one gives to their mistakes" - Oscar Wilde

> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk

> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel





More information about the Scummvm-devel mailing list