Android - how to add gain control while recording

I am working for a recording device application and want to add gain control, but I do not know how to do this. I have access to the sound buffer, but I don’t know how to make the sound louder or slower. I see other applications that have seekBar to select decibels from a specific range.

aRecorder.read(buffer, 0, buffer.length);
fWriter.write(buffer); // Write buffer to file

Please tell me what to do to implement gain control in my application.

Thank.

+1
source share
1 answer

, . +/- 3dB () 2 0,5 (. http://en.wikipedia.org/wiki/Decibel). , , .

. AudioSampleBuffer:: applyGainRamp() @http://www.rawmaterialsoftware.com/api/classAudioSampleBuffer.html

+1

All Articles