[Openal-devel] Using C++ in ALUT?

Chris Robinson chris.kcat at gmail.com
Mon Jun 2 17:10:02 PDT 2008


On Monday 02 June 2008 04:43:05 pm Sherief N. Farouk wrote:
> Would we even need a "virtual interface"? I think most functions can be
> statically bound.

Perhaps. The idea with the virtual interface would be that it could use 
user-overrides, though (eg. MP3 support through the alutStream interface 
without relying on the user's ALUT or having to change function calls), and 
not having to expose the implementation details. With a virtual interface, 
the real implementation only needs to inherit from the interface and 
implement the functions, adding whatever data into the object it needs. The 
app would never see, nor care about, the extra implementation data. This 
makes doing changes easier since it wouldn't break the ABI if you add, 
remove, or change fields in the implementation. The only thing that has to 
remain constant is the interface itself (which would need to be set anyway 
for the C version).

There may also be issues with exporting non-virtual class members. I don't 
believe this has been an issue on Windows and Linux for quite some time, but 
I don't know about other OSs.


More information about the Openal-devel mailing list