I want to record music playing in my app.like i am playing different sounds with sound pool.Now I want that only soundpool audio is record and save in .wav or mp3 file. I use audio record to record sound.
AudioRecord audioRecord = new AudioRecord(AudioManager.STREAM_MUSIC,
int minBufferSize = AudioRecord.getMinBufferSize(44100,
short audioData = new short[minBufferSize];
Although i did not find answer of my question, but now i am using technique for recording aspects which i want to share with all of you. Above function which i try to use is totally wrong option when you are trying to save music created by your app at run time. now for my first version i just saving the clicks of piano buttons along with system time in an array. now when i play that clicks it will play same sound as user try to record. i save these notes in database for further reuse by users.although this is not solution because these notes will be played in our app only, but this is good feature which we can add in our app. when i solve the exact solution, i will share with you guys