Merge 152e2a9e3bf0bc852fd843e8d66e7c5d8b85602d on remote branch

Change-Id: If4cbef8fd987043e172a463a6b519e0f6ae11e41
diff --git a/src/jni/rtp/AudioGroup.cpp b/src/jni/rtp/AudioGroup.cpp
index 1a31f82..eb3b18f 100644
--- a/src/jni/rtp/AudioGroup.cpp
+++ b/src/jni/rtp/AudioGroup.cpp
@@ -903,8 +903,8 @@
                 status_t status = track->obtainBuffer(&buffer, 1);
                 if (status == NO_ERROR) {
                     int offset = sampleCount - toWrite;
-                    memcpy(buffer.i8, &output[offset], buffer.size);
-                    toWrite -= buffer.frameCount;
+                    memcpy(buffer.data(), &output[offset], buffer.size());
+                    toWrite -= buffer.getFrameCount();
                     track->releaseBuffer(&buffer);
                 } else if (status != TIMED_OUT && status != WOULD_BLOCK) {
                     ALOGE("cannot write to AudioTrack");
@@ -919,8 +919,8 @@
                 status_t status = record->obtainBuffer(&buffer, 1);
                 if (status == NO_ERROR) {
                     int offset = sampleCount - toRead;
-                    memcpy(&input[offset], buffer.i8, buffer.size);
-                    toRead -= buffer.frameCount;
+                    memcpy(&input[offset], buffer.data(), buffer.size());
+                    toRead -= buffer.getFrameCount();
                     record->releaseBuffer(&buffer);
                 } else if (status != TIMED_OUT && status != WOULD_BLOCK) {
                     ALOGE("cannot read from AudioRecord");