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
264 stars 45 forks source link

Multitrack audio recording #178

Open cdigit opened 1 year ago

cdigit commented 1 year ago

I would like to make a simple multitrack audio recorder where microphone audio can be recorded while playing multiple tracks and all tracks can be played back simultaneously with low latency precision. I’m not interested in audio synthesis, but sample recording, playback and effects like applying reverb. I’m looking at Oboe and MWEngine and trying to find the best solution. I’m new to audio programming and know it’s going to take some time to get it, but I would like to know for my use case which library would be best. Btw I also plan to try and integrate the c++ in a flutter app and use its FFI or state channels feature. I’ve had some success doing that with c++.

igorski commented 1 year ago

Hi there.

Both Oboe and MWEngine allow you to do this, though with Oboe you need to get your hands more dirty as you will be writing code at a lower level, whereas MWEngine will provide you with convenient abstractions out of the box.

The example Activity in the MWEngine repository actually does everything you describe:

...and a little more as it is also showcasing the live synthesis possibilities.

If you hadn't already, you can read the Wiki on MWEngine and especially some of the usage examples as it might give you an insight over which library you would prefer to be working with. At the end of the end, both will do just fine (and Oboe is obviously backend by a large company of excellent developers) but it boils down to what you'll be most comfortable with.