Lines Matching refs:mBufferQueue
162 if (ap->mBufferQueue.mState.count != 0) { in adecoder_writeToBufferQueue()
163 assert(ap->mBufferQueue.mFront != ap->mBufferQueue.mRear); in adecoder_writeToBufferQueue()
165 BufferHeader *oldFront = ap->mBufferQueue.mFront; in adecoder_writeToBufferQueue()
168 uint8_t *pDest = (uint8_t *)oldFront->mBuffer + ap->mBufferQueue.mSizeConsumed; in adecoder_writeToBufferQueue()
169 if (ap->mBufferQueue.mSizeConsumed + size < oldFront->mSize) { in adecoder_writeToBufferQueue()
171 ap->mBufferQueue.mSizeConsumed += size; in adecoder_writeToBufferQueue()
177 sizeConsumed = oldFront->mSize - ap->mBufferQueue.mSizeConsumed; in adecoder_writeToBufferQueue()
180 ap->mBufferQueue.mSizeConsumed = 0; in adecoder_writeToBufferQueue()
181 if (newFront == &ap->mBufferQueue.mArray[ap->mBufferQueue.mNumBuffers + 1]) { in adecoder_writeToBufferQueue()
182 newFront = ap->mBufferQueue.mArray; in adecoder_writeToBufferQueue()
184 ap->mBufferQueue.mFront = newFront; in adecoder_writeToBufferQueue()
186 ap->mBufferQueue.mState.count--; in adecoder_writeToBufferQueue()
187 ap->mBufferQueue.mState.playIndex++; in adecoder_writeToBufferQueue()
192 callback = ap->mBufferQueue.mCallback; in adecoder_writeToBufferQueue()
194 callbackPContext = ap->mBufferQueue.mContext; in adecoder_writeToBufferQueue()
205 (*callback)(&ap->mBufferQueue.mItf, callbackPContext); in adecoder_writeToBufferQueue()
1248 interface_lock_exclusive(&ap->mBufferQueue); in audioTrack_handleMoreData_lockPlay()
1250 if (ap->mBufferQueue.mCallbackPending) { in audioTrack_handleMoreData_lockPlay()
1252 slBufferQueueCallback callback = ap->mBufferQueue.mCallback; in audioTrack_handleMoreData_lockPlay()
1254 callbackPContext = ap->mBufferQueue.mContext; in audioTrack_handleMoreData_lockPlay()
1255 interface_unlock_exclusive(&ap->mBufferQueue); in audioTrack_handleMoreData_lockPlay()
1256 (*callback)(&ap->mBufferQueue.mItf, callbackPContext); in audioTrack_handleMoreData_lockPlay()
1257 interface_lock_exclusive(&ap->mBufferQueue); in audioTrack_handleMoreData_lockPlay()
1258 ap->mBufferQueue.mCallbackPending = false; in audioTrack_handleMoreData_lockPlay()
1262 if (ap->mBufferQueue.mState.count != 0) { in audioTrack_handleMoreData_lockPlay()
1264 assert(ap->mBufferQueue.mFront != ap->mBufferQueue.mRear); in audioTrack_handleMoreData_lockPlay()
1266 BufferHeader *oldFront = ap->mBufferQueue.mFront; in audioTrack_handleMoreData_lockPlay()
1269 size_t availSource = oldFront->mSize - ap->mBufferQueue.mSizeConsumed; in audioTrack_handleMoreData_lockPlay()
1272 void *pSrc = (char *)oldFront->mBuffer + ap->mBufferQueue.mSizeConsumed; in audioTrack_handleMoreData_lockPlay()
1276 ap->mBufferQueue.mSizeConsumed += bytesToCopy; in audioTrack_handleMoreData_lockPlay()
1279 ap->mBufferQueue.mSizeConsumed = 0; in audioTrack_handleMoreData_lockPlay()
1281 &ap->mBufferQueue.mArray in audioTrack_handleMoreData_lockPlay()
1282 [ap->mBufferQueue.mNumBuffers + 1]) in audioTrack_handleMoreData_lockPlay()
1284 newFront = ap->mBufferQueue.mArray; in audioTrack_handleMoreData_lockPlay()
1286 ap->mBufferQueue.mFront = newFront; in audioTrack_handleMoreData_lockPlay()
1288 ap->mBufferQueue.mState.count--; in audioTrack_handleMoreData_lockPlay()
1289 ap->mBufferQueue.mState.playIndex++; in audioTrack_handleMoreData_lockPlay()
1290 ap->mBufferQueue.mCallbackPending = true; in audioTrack_handleMoreData_lockPlay()
1313 interface_unlock_exclusive(&ap->mBufferQueue); in audioTrack_handleMoreData_lockPlay()
1639 notificationFrames = -pAudioPlayer->mBufferQueue.mNumBuffers; in android_audioPlayer_realize()