问题
I have an urgent requirement of capturing the audio stream on click of buttons. eg: I play different sounds on click of buttons like in piano. Now i want to capture these sounds played in a single file. The possible ways I tried are -
1) I merged the sound files played into a single file. (in this case: the merged file has written data of all sound files, however it plays only the first sound file- not the other appended sound files.)
2) I then tried merging files using javax.sound, but unfortunately android doesn't support this package.
Thinking that merging files would not help-
3) I thought of recording the sounds played on click of buttons using MediaRecorder, AudioRecord even the native audio libraries .... but these methods use Mic as an AudioSource for recording the audio stream inducing noise (surrounding sound) which is obviously not as expected.
If anyone has solution or can suggest of resources to solve this problem, it would be of great help. Thanks in advance :)
来源:https://stackoverflow.com/questions/7776772/recording-or-merging-sounds-onclick-of-buttons-as-in-piano