Lines Matching defs:audioBuffer
1240 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
1242 if (audioBuffer == NULL) {
1246 audioBuffer->frameCount = 0;
1247 audioBuffer->size = 0;
1248 audioBuffer->raw = NULL;
1267 return obtainBuffer(audioBuffer, requested);
1270 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, const struct timespec *requested,
1327 buffer.mFrameCount = audioBuffer->frameCount;
1333 audioBuffer->frameCount = buffer.mFrameCount;
1334 audioBuffer->size = buffer.mFrameCount * mFrameSizeAF;
1335 audioBuffer->raw = buffer.mRaw;
1342 void AudioTrack::releaseBuffer(Buffer* audioBuffer)
1348 size_t stepCount = audioBuffer->size / mFrameSizeAF;
1355 buffer.mRaw = audioBuffer->raw;
1399 Buffer audioBuffer;
1402 audioBuffer.frameCount = userSize / mFrameSize;
1404 status_t err = obtainBuffer(&audioBuffer,
1416 toWrite = audioBuffer.size >> 1;
1417 memcpy_to_i16_from_u8(audioBuffer.i16, (const uint8_t *) buffer, toWrite);
1419 toWrite = audioBuffer.size;
1420 memcpy(audioBuffer.i8, buffer, toWrite);
1426 releaseBuffer(&audioBuffer);
1719 Buffer audioBuffer;
1720 audioBuffer.frameCount = mRemainingFrames;
1722 status_t err = obtainBuffer(&audioBuffer, requested, NULL, &nonContig);
1723 LOG_ALWAYS_FATAL_IF((err != NO_ERROR) != (audioBuffer.frameCount == 0),
1724 "obtainBuffer() err=%d frameCount=%zu", err, audioBuffer.frameCount);
1726 size_t avail = audioBuffer.frameCount + nonContig;
1728 mRemainingFrames, avail, audioBuffer.frameCount, nonContig, err);
1753 audioBuffer.size >>= 1;
1756 size_t reqSize = audioBuffer.size;
1757 mCbf(EVENT_MORE_DATA, mUserData, &audioBuffer);
1758 size_t writtenSize = audioBuffer.size;
1777 memcpy_to_i16_from_u8(audioBuffer.i16, (const uint8_t *) audioBuffer.i8, writtenSize);
1778 audioBuffer.size <<= 1;
1781 size_t releasedFrames = audioBuffer.size / mFrameSizeAF;
1782 audioBuffer.frameCount = releasedFrames;
1790 releaseBuffer(&audioBuffer);