Lines Matching defs:audioBuffer
1261 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
1263 if (audioBuffer == NULL) {
1267 audioBuffer->frameCount = 0;
1268 audioBuffer->size = 0;
1269 audioBuffer->raw = NULL;
1288 return obtainBuffer(audioBuffer, requested);
1291 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, const struct timespec *requested,
1348 buffer.mFrameCount = audioBuffer->frameCount;
1354 audioBuffer->frameCount = buffer.mFrameCount;
1355 audioBuffer->size = buffer.mFrameCount * mFrameSizeAF;
1356 audioBuffer->raw = buffer.mRaw;
1363 void AudioTrack::releaseBuffer(Buffer* audioBuffer)
1369 size_t stepCount = audioBuffer->size / mFrameSizeAF;
1376 buffer.mRaw = audioBuffer->raw;
1420 Buffer audioBuffer;
1423 audioBuffer.frameCount = userSize / mFrameSize;
1425 status_t err = obtainBuffer(&audioBuffer,
1437 toWrite = audioBuffer.size >> 1;
1438 memcpy_to_i16_from_u8(audioBuffer.i16, (const uint8_t *) buffer, toWrite);
1440 toWrite = audioBuffer.size;
1441 memcpy(audioBuffer.i8, buffer, toWrite);
1447 releaseBuffer(&audioBuffer);
1740 Buffer audioBuffer;
1741 audioBuffer.frameCount = mRemainingFrames;
1743 status_t err = obtainBuffer(&audioBuffer, requested, NULL, &nonContig);
1744 LOG_ALWAYS_FATAL_IF((err != NO_ERROR) != (audioBuffer.frameCount == 0),
1745 "obtainBuffer() err=%d frameCount=%zu", err, audioBuffer.frameCount);
1747 size_t avail = audioBuffer.frameCount + nonContig;
1749 mRemainingFrames, avail, audioBuffer.frameCount, nonContig, err);
1774 audioBuffer.size >>= 1;
1777 size_t reqSize = audioBuffer.size;
1778 mCbf(EVENT_MORE_DATA, mUserData, &audioBuffer);
1779 size_t writtenSize = audioBuffer.size;
1798 memcpy_to_i16_from_u8(audioBuffer.i16, (const uint8_t *) audioBuffer.i8, writtenSize);
1799 audioBuffer.size <<= 1;
1802 size_t releasedFrames = audioBuffer.size / mFrameSizeAF;
1803 audioBuffer.frameCount = releasedFrames;
1811 releaseBuffer(&audioBuffer);