Michael Stefaniuc wrote:
My idea was to have the whole if else in an inline function.
That's understandable. However in this particular case, we know that in Wine QueryPerfFrequency now yields 10000000, thus Muldiv64 is dead code actually. So I decided to keep the if (freq == 10000000) return idem; in the main code and delegate the unused MulDiv to an auxiliary.
In winmm:waveform, things are a little different, and I was indeed considering integrating the if (num==den) /* typically num = den = samples per second */ into the MulDiv64, should I add one there too.
A general purpose MulDiv however, should not waste cycles performing this particular check.
Regards, Jörg Höhle