2008/12/7 Pete Stieber <[EMAIL PROTECTED]>: > Dan wrote: >> Hi - >> >> Compiling using latest svn portmidi on windows (winxp, visual c++ 2008 >> express) fails like this: >> c:\......\portmidi\pm_win\pmwin.c(48) : fatal error C1019: unexpected >> #else >> Looking at the source code, the #else on line 48 is clearly one too >> many. It's the first one here: >> >> void pm_init(void) >> { >> #ifdef DEBUG >> printf("registered pm_term with cleanup DLL\n"); >> #endif >> #else >> atexit(pm_exit); >> #ifdef DEBUG >> printf("registered pm_exit with atexit()\n"); >> #endif >> #endif >> pm_winmm_init(); >> /* initialize other APIs (DirectX?) here */ >> } >> >> I'm new to portmidi so I don't know for sure whether the first "endif" >> should be removed (which would be the quickest route to balancing), >> or if the "else" and one of the later "endif"s should bbe removed, >> which looks like it might be more correct. >> >> Any advice? Grateful for any suggestions. > > Hi Dan, > > I sent Roger Dannenberg the attached patch, but I don't think it has been > applied. Hope this helps.
Hi - Thanks, yes, this fixes it for me. Note to developers, recommend this patch for the svn. All the best Dan > Index: portmidi/trunk/pm_win/pmwin.c > =================================================================== > --- portmidi/trunk/pm_win/pmwin.c (revision 113) > +++ portmidi/trunk/pm_win/pmwin.c (working copy) > @@ -45,12 +45,10 @@ > #ifdef DEBUG > printf("registered pm_term with cleanup DLL\n"); > #endif > -#else > atexit(pm_exit); > #ifdef DEBUG > printf("registered pm_exit with atexit()\n"); > #endif > -#endif > pm_winmm_init(); > /* initialize other APIs (DirectX?) here */ > } > Index: portmidi/trunk/pm_win/pmwinmm.c > =================================================================== > --- portmidi/trunk/pm_win/pmwinmm.c (revision 113) > +++ portmidi/trunk/pm_win/pmwinmm.c (working copy) > @@ -668,6 +668,7 @@ > static int entry = 0; > PmInternal *midi = (PmInternal *) dwInstance; > midiwinmm_type m = (midiwinmm_type) midi->descriptor; > + long new_driver_time; > > /* NOTE: we do not just EnterCriticalSection() here because an > * MIM_CLOSE message arrives when the port is closed, but then > @@ -690,7 +691,7 @@ > in [ms] from when midiInStart called. > each message is expanded to include the status byte */ > > - long new_driver_time = dwParam2; > + new_driver_time = dwParam2; > > if ((dwParam1 & 0x80) == 0) { > /* not a status byte -- ignore it. This happened running the > _______________________________________________ media_api mailing list media_api@create.ucsb.edu http://lists.create.ucsb.edu/mailman/listinfo/media_api