1

I look into record voice procedure and blocked in AudioRecord::processAudioBuffer(), here is the codes

nsecs_t AudioRecord::processAudioBuffer() {
   ...
   status_t err = obtainBuffer(&audioBuffer, requested, NULL, &nonContig);
   ...
}

status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, const struct timespec *requested,
        struct timespec *elapsed, size_t *nonContig) {
   ...
   status = proxy->obtainBuffer(&buffer, requested, elapsed);
   ...
   audioBuffer->raw = buffer.mRaw;
   ...
}

__attribute__((no_sanitize("integer")))
status_t ClientProxy::obtainBuffer(Buffer* buffer, const struct timespec *requested,
        struct timespec *elapsed) {
    ...
    buffer->mRaw = part1 > 0 ?
                    &((char *) mBuffers)[(mIsOut ? rear : front) * mFrameSize] : NULL;
    ...
}

I try to finger out where ClientProxy.mBuffers data was filled and how audioflinger pass the decoded voice data to ClientProxy.mBuffers, but I am lost in the audioclient codes.

Is anybody can lead me out? Thanks!

p mai
  • 11
  • 2
  • New Updated ! May be ClientProxy.mBuffer point to RecordTrack.mCblk, but still I can't find how RecordTrack.mCblk was filled with decoded voice data. – p mai Jun 19 '18 at 01:35

0 Answers0