-
Notifications
You must be signed in to change notification settings - Fork 45
Adding new components
While MWEngine aims to offer enough out-of-the-box functionality, it was written as a framework upon which you can easily build and extend to cater to your own needs.
So how do you go about adding new components to the library ?
When adding new C(++) classes that should be part of the compiled library, be sure to add them to the makefile in CMakeLists.txt
, which is something you'd probably knew anyways, but if you wish to use the engine within a Java application be sure to remember:
If you wish to use the library from Java via JNI, you might want to update the SWIG interface file in mwengine.i
. This file describes which components of the library you want to make accessible from Java. Note that you can include new C++ classes in the makefile to be part of the library, but you can exclude these from mwengine.i to make sure they are invisible to Java (for instance to use a shared component/private utility that should never be interacted with directly).
To expose a C++ class via SWIG to Java using the mwengine.i-file, you include the class header in twofold like so :
#include "path/to/custom_class.h"
%include "path/to/custom_class.h"
If you feel you have written an excellent DSP / written an awesome alternative to existing components or improved existing functionalities, don't hesitate to make a pull request to add to the engine!