Recording or merging sounds onclick of buttons (as in piano)

匆匆过客 提交于 2019-12-23 12:43:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!