[openbeos-midi] Re: MIDI parser source (bytestream->MIDImessages)

  • From: Christian Packmann <Christian.Packmann@xxxxxx>
  • To: openbeos-midi@xxxxxxxxxxxxx
  • Date: Sun, 01 Feb 2004 13:36:18 +0100

Martijn Sipkema wrote:
> > Although I wonder why you declared all local variables "static," since 
> It won't work without the static, but it won't work correctly with them 
> either; it is not a good idea to store state in static variables. Perhaps 
> you only included the static variables to demonstrate the parser...
> You need to have the parser be a member function of a class that holds 
> the state. This allows correct parsing of more than one stream from a 
> single application.

You're right of course. I just haven't advanced to the state where I can 
worry about such petty things as multiple instances of the code. :) But 
thanks for pointing this out, I may have overlooked this... I'm doing too 
much coding these days. ;)


Other related posts: