Lines Matching refs:pBuffer

73 status_t CopyBufferProvider::getNextBuffer(AudioBufferProvider::Buffer *pBuffer,  in getNextBuffer()  argument
79 status_t res = mTrackBufferProvider->getNextBuffer(pBuffer, pts); in getNextBuffer()
81 copyFrames(pBuffer->raw, pBuffer->raw, pBuffer->frameCount); in getNextBuffer()
86 mBuffer.frameCount = pBuffer->frameCount; in getNextBuffer()
95 pBuffer->raw = NULL; in getNextBuffer()
96 pBuffer->frameCount = 0; in getNextBuffer()
103 count = min(count, pBuffer->frameCount); in getNextBuffer()
104 pBuffer->raw = mLocalBufferData; in getNextBuffer()
105 pBuffer->frameCount = count; in getNextBuffer()
106 copyFrames(pBuffer->raw, (uint8_t*)mBuffer.raw + mConsumed * mInputFrameSize, in getNextBuffer()
107 pBuffer->frameCount); in getNextBuffer()
111 void CopyBufferProvider::releaseBuffer(AudioBufferProvider::Buffer *pBuffer) in releaseBuffer() argument
116 mTrackBufferProvider->releaseBuffer(pBuffer); in releaseBuffer()
120 mConsumed += pBuffer->frameCount; // TODO: update for efficiency to reuse existing content in releaseBuffer()
125 pBuffer->raw = NULL; in releaseBuffer()
126 pBuffer->frameCount = 0; in releaseBuffer()
359 AudioBufferProvider::Buffer *pBuffer, int64_t pts) in getNextBuffer() argument
362 this, pBuffer, pBuffer->frameCount, pts); in getNextBuffer()
368 if (pBuffer->frameCount <= mRemaining) { in getNextBuffer()
370 pBuffer->raw = mLocalBufferData; in getNextBuffer()
375 if (pBuffer->frameCount > mLocalBufferFrameCount) { in getNextBuffer()
377 if (posix_memalign(&newmem, 32, pBuffer->frameCount * mFrameSize) == OK) { in getNextBuffer()
383 mLocalBufferFrameCount = pBuffer->frameCount; in getNextBuffer()
388 const size_t outputDesired = pBuffer->frameCount - mRemaining; in getNextBuffer()
400 pBuffer->raw = NULL; in getNextBuffer()
401 pBuffer->frameCount = 0; in getNextBuffer()
404 pBuffer->raw = mLocalBufferData; in getNextBuffer()
405 pBuffer->frameCount = mRemaining; in getNextBuffer()
424 pBuffer->raw = mLocalBufferData; in getNextBuffer()
425 pBuffer->frameCount = mRemaining; in getNextBuffer()
430 void TimestretchBufferProvider::releaseBuffer(AudioBufferProvider::Buffer *pBuffer) in releaseBuffer() argument
433 this, pBuffer, pBuffer->frameCount); in releaseBuffer()
439 if (pBuffer->frameCount < mRemaining) { in releaseBuffer()
441 (uint8_t*)mLocalBufferData + pBuffer->frameCount * mFrameSize, in releaseBuffer()
442 (mRemaining - pBuffer->frameCount) * mFrameSize); in releaseBuffer()
443 mRemaining -= pBuffer->frameCount; in releaseBuffer()
444 } else if (pBuffer->frameCount == mRemaining) { in releaseBuffer()
448 pBuffer->frameCount, mRemaining); in releaseBuffer()
451 pBuffer->raw = NULL; in releaseBuffer()
452 pBuffer->frameCount = 0; in releaseBuffer()