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!