[PATCH 1/2] xaudio2: Fix support for FAudio 19.06 and newer

Zebediah Figura z.figura12 at gmail.com
Thu May 2 11:40:47 CDT 2019


On 05/02/2019 09:15 AM, Ethan Lee wrote:
> The main conflict there is that we already use numbers to denote spec versions, for example F3DAudioInitialize8 for the XAudio 2.8 revision of X3DAudioInitialize.
> 
> If it helps, the main thing I’m trying to figure out is what name best explains that it’s the correct function to use right now, but definitely not later. Something that sticks out horribly and will make everyone want to get rid of it. A few ideas I had:
> 
> - FAudio_CommitChangesBADABI
> - FAudio_CommitChangesFIXME
> - FAudio_CommitChangesUSETHIS
> 
> The idea is that we add the above, deprecate the old one, then for ABI version 1, fix the function signature of the original and deprecate the above function for ABI version 2.

The idea of backwards compatibility is that a program should still be
able to compile and run with any respective combination of old and new
versions of the library. Renaming the old function breaks this. It also
means that you want to load the new function at runtime rather than
assuming it'll be present if compile-time support is there.

As for naming convention, a few suggestions are:

* FAudio_CommitChanges_a (e.g. libdwarf), or FAudio_CommitChangesA if
you insist on title case
* FAudio_CommitChangesBySet
* FAudio_CommitChanges_v2
* FAudio_CommitChanges_ex (or FAudio_CommitChangesEx, but this has the
risk of colliding with a future function Microsoft adds)

Personally I'm a fan of a descriptive name like CommitChangesBySet(),
but ultimately it's your choice.



More information about the wine-devel mailing list