FMOD ANDROID: Sound Overlap/Mix , save

Hi, I want to overlap 2 sounds. 1 sound is the main voice and the other one is background music. I found this post (Merging Audio Help), but I am too noob to understand it. Maybe I need more explanation and code to achieve this.
Far now, I can play 2 sounds together to get that effect, like this:
systemA->createSound(path_cstr, FMOD_LOOP_OFF, 0, &soundA);
systemB->createSound(path_cstr2, FMOD_DEFAULT, 0, &soundB);
systemA->playSound(soundA, 0, 0, &channelA);
systemB->playSound(soundB, 0, 0, &channelB);

this is working well.

Now, I want to save the result in a .wav file. Need help to achieve the task.
Please try to help with code samples or sample example links if available.
As I am new to FMOD.

To have FMOD write to a file instead of to the audio hardware check out System::setOutput and FMOD_OUTPUTTYPE_WAVWRITER.

Hey @mathew. I can save file like this. But how to track the progress of saving with this method.
I want to show Playing and Saving progress on the Android side.

Saving is performed in chunks as the sounds play, not as a separate task that requires a progress bar.

Using wav writer, as playback happens the audio is written to file. If you need to process faster than real time, use wav writer NRT (non-real time), then each time you call Update another chunk of audio is written to file.

If you only want to track how much of a sound has played (and thus been written) check out Channel::getPosition

I am already using
FMOD_OUTPUTTYPE_WAVWRITER_NRT

How to calculate total number of chunks. So maybe we can update progress according to Total chunks , whenever system->update is called.
Completed chunks / total chunks * 100

You can get the chunk size from bufferlength with System::getDSPBufferSize. You can get the file length from Sound::getLength. Alternatively you could just keep calling update until Channel::isPlaying returns false.

Anyone can give a link to the documentation, which is not really written.
Show a real working example of writing a file.

I am working on my Application from past 1 year which is using FMOD lib. I have achieved many functionalities with it. but still due to poor documentation it take to much time to complete tasks. And FMOD is not properly handled in android SDK, many time which give stack overflow exceptions and stop functionalities automatically.
anyway i will share Save file or writing to it snippet woth you soon.