Home | History | Annotate | Download | only in audioflinger

Lines Matching full:pbuffer

73 status_t CopyBufferProvider::getNextBuffer(AudioBufferProvider::Buffer *pBuffer)
76 // this, pBuffer, pBuffer->frameCount);
78 status_t res = mTrackBufferProvider->getNextBuffer(pBuffer);
80 copyFrames(pBuffer->raw, pBuffer->raw, pBuffer->frameCount);
85 mBuffer.frameCount = pBuffer->frameCount;
94 pBuffer->raw = NULL;
95 pBuffer->frameCount = 0;
102 count = min(count, pBuffer->frameCount);
103 pBuffer->raw = mLocalBufferData;
104 pBuffer->frameCount = count;
105 copyFrames(pBuffer->raw, (uint8_t*)mBuffer.raw + mConsumed * mInputFrameSize,
106 pBuffer->frameCount);
110 void CopyBufferProvider::releaseBuffer(AudioBufferProvider::Buffer *pBuffer)
113 // this, pBuffer, pBuffer->frameCount);
115 mTrackBufferProvider->releaseBuffer(pBuffer);
118 // LOG_ALWAYS_FATAL_IF(pBuffer->frameCount == 0, "Invalid framecount");
119 mConsumed += pBuffer->frameCount; // TODO: update for efficiency to reuse existing content
124 pBuffer->raw = NULL;
125 pBuffer->frameCount = 0;
358 AudioBufferProvider::Buffer *pBuffer)
361 this, pBuffer, pBuffer->frameCount);
364 //return mTrackBufferProvider->getNextBuffer(pBuffer);
367 if (pBuffer->frameCount <= mRemaining) {
369 pBuffer->raw = mLocalBufferData;
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;
399 pBuffer->raw = NULL;
400 pBuffer->frameCount = 0;
403 pBuffer->raw = mLocalBufferData;
404 pBuffer->frameCount = mRemaining;
423 pBuffer->raw = mLocalBufferData;
424 pBuffer->frameCount = mRemaining;
429 void TimestretchBufferProvider::releaseBuffer(AudioBufferProvider::Buffer *pBuffer)
432 this, pBuffer, pBuffer->frameCount);
435 //return mTrackBufferProvider->releaseBuffer(pBuffer);
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);
450 pBuffer->raw = NULL;
451 pBuffer->frameCount = 0;