>> >This way there is no need to parse any strings, we don't pass
>> >any pointers, the setup routine would just be a big switch/case.
>> This is basically the way TagItems work when passed on stack, in fact, that
>> combined with another identical function that does float we're pretty much
>> set.
>       Why do we need float at this point ??

Because several of the parsed arguments are floats?

Well, anyway, I just finished up the following:

/* Set a parameter with string-pointer */
void lame_set_string(lame_global_flags *gfp, lame_param_tag tag1, ...);

/* Set a parameter with float or double value (varargs promotes floats to double) */
void lame_set_float(lame_global_flags *gfp, lame_param_tag tag1, ...);

/* Set a parameter with char, short or int value (varargs promotes integrals to int) */
void lame_set_int(lame_global_flags *gfp, lame_param_tag tag1, ...);


This can cater for any kind of parameter, and the functions themselves are
very simple, yet can take several parameters in a row...

Should I start implementing this now, or wait after 3.87 release?

Mark?


What needs to be changed to make a real shared library:

o Exchange all direct access to lame_global_flags in parse.c with calls to
  lame_set_xxx().

o main.c can't hold lame_global_flags, change lame_init() to allocate and
  return a pointer to lame_global_flags.

o Move lame_global_flags out of lame.h, it should never be accessed externally.

o ..and any other changes still needed for re-entrance ofcos.


- CISC

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to