Home | History | Annotate | Download | only in libmedia

Lines Matching refs:audioBuffer

1116 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
1118 if (audioBuffer == NULL) {
1122 audioBuffer->frameCount = 0;
1123 audioBuffer->size = 0;
1124 audioBuffer->raw = NULL;
1143 return obtainBuffer(audioBuffer, requested);
1146 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, const struct timespec *requested,
1203 buffer.mFrameCount = audioBuffer->frameCount;
1209 audioBuffer->frameCount = buffer.mFrameCount;
1210 audioBuffer->size = buffer.mFrameCount * mFrameSizeAF;
1211 audioBuffer->raw = buffer.mRaw;
1218 void AudioTrack::releaseBuffer(Buffer* audioBuffer)
1224 size_t stepCount = audioBuffer->size / mFrameSizeAF;
1231 buffer.mRaw = audioBuffer->raw;
1265 Buffer audioBuffer;
1268 audioBuffer.frameCount = userSize / mFrameSize;
1270 status_t err = obtainBuffer(&audioBuffer, &ClientProxy::kForever);
1281 toWrite = audioBuffer.size >> 1;
1282 memcpy_to_i16_from_u8(audioBuffer.i16, (const uint8_t *) buffer, toWrite);
1284 toWrite = audioBuffer.size;
1285 memcpy(audioBuffer.i8, buffer, toWrite);
1291 releaseBuffer(&audioBuffer);
1583 Buffer audioBuffer;
1584 audioBuffer.frameCount = mRemainingFrames;
1586 status_t err = obtainBuffer(&audioBuffer, requested, NULL, &nonContig);
1587 LOG_ALWAYS_FATAL_IF((err != NO_ERROR) != (audioBuffer.frameCount == 0),
1588 "obtainBuffer() err=%d frameCount=%u", err, audioBuffer.frameCount);
1590 size_t avail = audioBuffer.frameCount + nonContig;
1592 mRemainingFrames, avail, audioBuffer.frameCount, nonContig, err);
1617 audioBuffer.size >>= 1;
1620 size_t reqSize = audioBuffer.size;
1621 mCbf(EVENT_MORE_DATA, mUserData, &audioBuffer);
1622 size_t writtenSize = audioBuffer.size;
1642 memcpy_to_i16_from_u8(audioBuffer.i16, (const uint8_t *) audioBuffer.i8, writtenSize);
1643 audioBuffer.size <<= 1;
1646 size_t releasedFrames = audioBuffer.size / mFrameSizeAF;
1647 audioBuffer.frameCount = releasedFrames;
1655 releaseBuffer(&audioBuffer);