Lines Matching refs:frameCount
86 size_t frameCount, in TrackBase() argument
112 mFrameCount(frameCount), in TrackBase()
137 size_t minBufferSize = buffer == NULL ? roundup(frameCount) : frameCount; in TrackBase()
139 if (minBufferSize < frameCount // roundup rounds down for values above UINT_MAX / 2 in TrackBase()
289 mTee.write(buffer->raw, buffer->frameCount); in releaseBuffer()
293 buf.mFrameCount = buffer->frameCount; in releaseBuffer()
295 buffer->frameCount = 0; in releaseBuffer()
315 uint64_t mixBufferNs = ((uint64_t)2 * thread.frameCount() * 1000000000) / in PatchTrackBase()
623 size_t frameCount, in Track() argument
636 : TrackBase(thread, client, attr, sampleRate, format, channelMask, frameCount, in Track()
690 mAudioTrackServerProxy = new AudioTrackServerProxy(mCblk, mBuffer, frameCount, in Track()
693 mAudioTrackServerProxy = new StaticAudioTrackServerProxy(mCblk, mBuffer, frameCount, in Track()
932 size_t desiredFrames = buffer->frameCount; in getNextBuffer()
935 buffer->frameCount = buf.mFrameCount; in getNextBuffer()
957 const size_t frameCount = sourceBuffer.frameCount; in interceptBuffer() local
958 if (frameCount == 0) { in interceptBuffer()
966 sourceBuffer.i8, frameCount, mFrameSize); in interceptBuffer()
967 const size_t framesLeft = frameCount - framesWritten; in interceptBuffer()
970 framesWritten, frameCount, framesLeft); in interceptBuffer()
1963 size_t frameCount, in OutputTrack() argument
1967 sampleRate, format, channelMask, frameCount,
1975 mOutBuffer.frameCount = 0;
1980 frameCount, mChannelMask);
2017 mOutBuffer.frameCount = 0; in stop()
2025 inBuffer.frameCount = frames; in write()
2042 if (pInBuffer->frameCount == 0) { in write()
2046 if (mOutBuffer.frameCount == 0) { in write()
2047 mOutBuffer.frameCount = pInBuffer->frameCount; in write()
2068 uint32_t outFrames = pInBuffer->frameCount > mOutBuffer.frameCount ? mOutBuffer.frameCount : in write()
2069 pInBuffer->frameCount; in write()
2076 pInBuffer->frameCount -= outFrames; in write()
2078 mOutBuffer.frameCount -= outFrames; in write()
2081 if (pInBuffer->frameCount == 0) { in write()
2098 if (inBuffer.frameCount) { in write()
2103 pInBuffer->mBuffer = malloc(inBuffer.frameCount * mFrameSize); in write()
2104 pInBuffer->frameCount = inBuffer.frameCount; in write()
2106 memcpy(pInBuffer->raw, inBuffer.raw, inBuffer.frameCount * mFrameSize); in write()
2111 inBuffer.frameCount = 0; in write()
2126 return frames - inBuffer.frameCount; // number of frames consumed. in write()
2148 buf.mFrameCount = buffer->frameCount; in obtainBuffer()
2153 buffer->frameCount = buf.mFrameCount; in obtainBuffer()
2187 size_t frameCount, in PatchTrack() argument
2195 sampleRate, format, channelMask, frameCount,
2199 PatchTrackBase(new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, true, true),
2239 buf.mFrameCount = buffer->frameCount; in getNextBuffer()
2247 buffer->frameCount = buf.mFrameCount; in getNextBuffer()
2264 buf.mFrameCount = buffer->frameCount; in releaseBuffer()
2302 const size_t frameCount = playbackThread->frameCount() * sampleRate() in releaseBuffer() local
2304 if (framesReady() < frameCount) { in releaseBuffer()
2400 size_t frameCount, in RecordTrack() argument
2411 channelMask, frameCount, buffer, bufferSize, sessionId, in RecordTrack()
2448 mServerProxy = new AudioRecordServerProxy(mCblk, mBuffer, frameCount, in RecordTrack()
2490 buf.mFrameCount = buffer->frameCount; in getNextBuffer()
2492 buffer->frameCount = buf.mFrameCount; in getNextBuffer()
2778 size_t frameCount, in PatchRecord() argument
2786 sampleRate, format, channelMask, frameCount,
2789 PatchTrackBase(new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, false, true),
2804 AudioBufferProvider* dest, const void* src, size_t frameCount, size_t frameSize) in writeFramesHelper() argument
2807 patchBuffer.frameCount = frameCount; in writeFramesHelper()
2814 ALOG_ASSERT(patchBuffer.frameCount <= frameCount); in writeFramesHelper()
2815 memcpy(patchBuffer.raw, src, patchBuffer.frameCount * frameSize); in writeFramesHelper()
2816 size_t framesWritten = patchBuffer.frameCount; in writeFramesHelper()
2823 AudioBufferProvider* dest, const void* src, size_t frameCount, size_t frameSize) in writeFrames() argument
2825 size_t framesWritten = writeFramesHelper(dest, src, frameCount, frameSize); in writeFrames()
2828 const size_t framesLeft = frameCount - framesWritten; in writeFrames()
2842 buf.mFrameCount = buffer->frameCount; in getNextBuffer()
2846 buffer->frameCount = buf.mFrameCount; in getNextBuffer()
2863 buf.mFrameCount = buffer->frameCount; in releaseBuffer()
2895 size_t frameCount, in PassthruPatchRecord() argument
2898 : PatchRecord(recordThread, sampleRate, channelMask, format, frameCount, in PassthruPatchRecord()
3043 buffer->frameCount = mLastReadFrames; in getNextBuffer()
3044 buffer->raw = buffer->frameCount != 0 ? mStubBuffer.get() : nullptr; in getNextBuffer()
3051 buffer->frameCount = 0; in releaseBuffer()
3107 buffer->frameCount = 0; in getNextBuffer()