yasiriqbal776 yasiriqbal776 - 1 year ago 76
Android Question

Android record sound of our own app

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];

Now audio is recording but problem is that quality is little bit bad and their is noise also.
Now I am stuck kindly help me.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download