igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
259 stars 45 forks source link

Allow runtime selection of audio driver #106

Closed igorski closed 4 years ago

igorski commented 4 years ago

Currently the engine must be compiled to either use OpenSL or AAudio as the driver. While AAudio promises better performance, OpenSL has a wider range of support.

Additionally, the unit tests use a mocked audio driver which is activated using a compiler directive. This greatly complicates building the library and running unit tests by not being able to do so side-by-side.

Make the engine a runtime option where the DriverAdapter is able to return the requested driver as appropriate. Update the CMakeLists.txt file to create mwengine as a shared library, remove the conditional for _RUNTESTS and make _mwengineunittest link to the shared mwengine. The entry point for unit tests (main.cpp) should auto select the mocked audio driver.

Update the README section on unit tests and "note on .. drivers"

igorski commented 4 years ago

Addressed in 7ab3d10e87f26f235fcd192d1aebcb930c2080b3