Best Way to combine Audio files in Android

2020-07-09 16:26发布

问题:

I am developing Recording App that includes Pause/Play option.

I tried with both Media Recorder and AudioRecord

In case of AudioRecord , the recorded audio consumes larger size, so if the recording size increases say for eg: if i record 1 min audio it consumes 40 to 50MB an it really paining to combine by converting it to .raw file and send to php server.

So i tried with Media Recorder, it consumes less size,but not able to combine using the previous way handled in Audio Record.

Next step i tried with Android NDK- really paining for even Set up process.

Now my question is that which is the best way to combine recorded audio files

  1. Using Android NDk
  2. Reading the byte data from Audio and combining -If i use this there is problem with Headers of Recording format say amr,wav like that.

Also if i try with this , i am not able to get javax.sound package , So i tried with Plugins but no luck..

Please Suggest best way to do this. Also i tried with all this following links

Audio Link 1

Audio Link 2

Audio Link 3

Audio Link 4

Provide me Good tutorial or samples or links.Thanks.

回答1:

For something like this your best bet would be to develop native C++ code using the NDK.



标签: android media