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) {
237 mDownmixConfig.inputCfg.buffer.frameCount = frames;
239 mDownmixConfig.outputCfg.buffer.frameCount = frames;
344 mBuffer.frameCount = 0;
351 if (mBuffer.frameCount != 0) {
361 this, pBuffer, pBuffer->frameCount);
367 if (pBuffer->frameCount <= mRemaining) {
374 if (pBuffer->frameCount > mLocalBufferFrameCount) {
376 if (posix_memalign(&newmem, 32, pBuffer->frameCount * mFrameSize) == OK) {
382 mLocalBufferFrameCount = pBuffer->frameCount;
387 const size_t outputDesired = pBuffer->frameCount - mRemaining;
390 mBuffer.frameCount = mPlaybackRate.mSpeed == AUDIO_TIMESTRETCH_SPEED_NORMAL
395 ALOG_ASSERT(res == OK || mBuffer.frameCount == 0);
396 if (res != OK || mBuffer.frameCount == 0) { // not needed by API spec, but to be safe.
400 pBuffer->frameCount = 0;
404 pBuffer->frameCount = mRemaining;
411 size_t srcAvailable = mBuffer.frameCount;
416 mBuffer.frameCount = srcAvailable;
424 pBuffer->frameCount = mRemaining;
432 this, pBuffer, pBuffer->frameCount);
437 // LOG_ALWAYS_FATAL_IF(pBuffer->frameCount == 0, "Invalid framecount");
438 if (pBuffer->frameCount < mRemaining) {
440 (uint8_t*)mLocalBufferData + pBuffer->frameCount * mFrameSize,
441 (mRemaining - pBuffer->frameCount) * mFrameSize);
442 mRemaining -= pBuffer->frameCount;
443 } else if (pBuffer->frameCount == mRemaining) {
447 pBuffer->frameCount, mRemaining);
451 pBuffer->frameCount = 0;