Lines Matching refs:frameCount

61     mBuffer.frameCount = 0;
67 if (mBuffer.frameCount != 0) {
76 // this, pBuffer, pBuffer->frameCount);
80 copyFrames(pBuffer->raw, pBuffer->raw, pBuffer->frameCount);
84 if (mBuffer.frameCount == 0) {
85 mBuffer.frameCount = pBuffer->frameCount;
88 // res == OK and mBuffer.frameCount == 0, doesn't seem to happen now 7/18/2014.
90 // By API spec, if res != OK, then mBuffer.frameCount == 0.
92 ALOG_ASSERT(res == OK || mBuffer.frameCount == 0);
93 if (res != OK || mBuffer.frameCount == 0) { // not needed by API spec, but to be safe.
95 pBuffer->frameCount = 0;
100 ALOG_ASSERT(mConsumed < mBuffer.frameCount);
101 size_t count = min(mLocalBufferFrameCount, mBuffer.frameCount - mConsumed);
102 count = min(count, pBuffer->frameCount);
104 pBuffer->frameCount = count;
106 pBuffer->frameCount);
113 // this, pBuffer, pBuffer->frameCount);
118 // LOG_ALWAYS_FATAL_IF(pBuffer->frameCount == 0, "Invalid framecount");
119 mConsumed += pBuffer->frameCount; // TODO: update for efficiency to reuse existing content
120 if (mConsumed != 0 && mConsumed >= mBuffer.frameCount) {
122 ALOG_ASSERT(mBuffer.frameCount == 0);
125 pBuffer->frameCount = 0;
130 if (mBuffer.frameCount != 0) {
416 mBuffer.frameCount = 0;
423 if (mBuffer.frameCount != 0) {
433 this, pBuffer, pBuffer->frameCount);
439 if (pBuffer->frameCount <= mRemaining) {
446 if (pBuffer->frameCount > mLocalBufferFrameCount) {
448 if (posix_memalign(&newmem, 32, pBuffer->frameCount * mFrameSize) == OK) {
454 mLocalBufferFrameCount = pBuffer->frameCount;
459 const size_t outputDesired = pBuffer->frameCount - mRemaining;
462 mBuffer.frameCount = mPlaybackRate.mSpeed == AUDIO_TIMESTRETCH_SPEED_NORMAL
467 ALOG_ASSERT(res == OK || mBuffer.frameCount == 0);
468 if (res != OK || mBuffer.frameCount == 0) { // not needed by API spec, but to be safe.
472 pBuffer->frameCount = 0;
476 pBuffer->frameCount = mRemaining;
483 size_t srcAvailable = mBuffer.frameCount;
488 mBuffer.frameCount = srcAvailable;
496 pBuffer->frameCount = mRemaining;
504 this, pBuffer, pBuffer->frameCount);
509 // LOG_ALWAYS_FATAL_IF(pBuffer->frameCount == 0, "Invalid framecount");
510 if (pBuffer->frameCount < mRemaining) {
512 (uint8_t*)mLocalBufferData + pBuffer->frameCount * mFrameSize,
513 (mRemaining - pBuffer->frameCount) * mFrameSize);
514 mRemaining -= pBuffer->frameCount;
515 } else if (pBuffer->frameCount == mRemaining) {
519 pBuffer->frameCount, mRemaining);
523 pBuffer->frameCount = 0;