On 5/2/19 6:45 PM, Ethan Lee wrote:
I’m really glad you butted in because this is actually a very good point (sorry I didn’t see it earlier, I only get wine-devel messages as digests). So maybe what I can do is add something totally different like `FAudio_CommitOperationSet` and in the documentation deliberately put the phrase “CommitChanges” in so users wondering where that function went can go find it quickly. I still think my bogus CommitChanges needs to be scrapped somehow but if we can agree that any use of CommitChanges is a bug (yes, even retroactively), maybe I can just make it do something extremely unpleasant that still allows the program to run, but make it so anyone using it can see something is wrong (stderr messages maybe?).
With GCC/Clang, you can mark a function with __attribute__((deprecated)) in the header, which causes a compile-time warning if code tries to use it. I think it's also possible to supply a message, to give a specific reason and/or alternative. The code will still compile and thus maintain API compatibility, but the developer will know it's an outdated function it should now avoid using. The library can also still export some version of the function, maintaining ABI compatibility too.
As for what to do regarding the old function's behavior, it ultimately depends. I'm not very familiar with XAudio, so I don't know exactly what the OperationSet parameter is for. Why wasn't it needed before, and why is it needed now? What did the function do before without it (I assume it worked in some capacity)?