0
0

Hi,

Mark Sibly here!

I’m primarily a C++ programmer, but understand that its important for FMOD to work with as many languages as possible so will try not to force C++ down everyone’s throat too much!

Initial impressions after a quick glance at things:

  • I really like the unification of everything into a single channel type. Very nice.

  • Multiple FMOD instances? Woohoo! Multiple listeners is nice too.

  • I think plain ‘C’ is the right choice for the main API. This makes it much more usable by a greater range of languages.

  • The C++ wrapper looks a little over the top to me. All the abstraction is handled internally by FMOD anyway, so having virtual functions for each method introduces unnecessary overhead. Instead, non-virtual inlined methods would be faster:

define FMOD_RESULT int //no virtual!

Class System{
FMOD_SYSTEM *_system;
public:
FMOD_RESULT setHWND( void *p ){ return FMOD_SYSTEM_SetHWND(_system,p); }
};

This would be functionally identical to making the C call, but in a C++ way. Yes, it makes for a messier header, but C++ coders are used to that!

  • One place that would be nice to see abstraction used is the file system stuff, eg:

Class FileSystem{
public:
virtual int open( const char *file );
virtual int read( void *buf,int sz );
virtual int write( const void *buf,int sz );
virtual void close( int handle );
};

…but its not really critical, and might even ruin the consistent flavor of things.

  • Are the CD audio functions still there?

Thats all for now. I do believe this is very big step forward for FMOD though!

Bye,
Mark

  • You must to post comments
0
0

Hi,

[quote:24uitcdc]
but the decision was to make it C again because this didnt work (cant change the interface without breaking backwards compatibility)
[/quote:24uitcdc]

Actually, as long as you don’t change the virtual function order of the existing interface – ie: you only add stuff at the end – there wouldn’t be a problem.

Bye!
Mark

  • You must to post comments
0
0

That would hold for C++. Other languages would be left out in the cold though since they are not compatible with C++ classes. Having C++ classes being a wrapper around a plain C API is the best way to get multiple language compatibility at this point.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.