Home
last modified time | relevance | path

Searched refs:numFrames (Results 1 – 25 of 122) sorted by relevance

12345

/frameworks/av/media/libaaudio/src/flowgraph/
DAudioProcessorBase.cpp24 int32_t AudioProcessorBase::pullData(int64_t framePosition, int32_t numFrames) { in pullData() argument
27 mFramesValid = onProcess(framePosition, numFrames); in pullData()
48 int32_t AudioFloatOutputPort::pullData(int64_t framePosition, int32_t numFrames) { in pullData() argument
49 numFrames = std::min(getFramesPerBlock(), numFrames); in pullData()
50 return mParent.pullData(framePosition, numFrames); in pullData()
63 int32_t AudioFloatInputPort::pullData(int64_t framePosition, int32_t numFrames) { in pullData() argument
65 ? std::min(getFramesPerBlock(), numFrames) in pullData()
66 : mConnected->pullData(framePosition, numFrames); in pullData()
78 int32_t AudioSink::pull(int32_t numFrames) { in pull() argument
79 int32_t actualFrames = input.pullData(mFramePosition, numFrames); in pull()
DAudioProcessorBase.h56 virtual int32_t onProcess(int64_t framePosition, int32_t numFrames) = 0;
67 int32_t pullData(int64_t framePosition, int32_t numFrames);
155 int32_t pullData(int64_t framePosition, int32_t numFrames);
195 int32_t pullData(int64_t framePosition, int32_t numFrames);
246 void setData(const void *data, int32_t numFrames) { in setData() argument
248 mSizeInFrames = numFrames; in setData()
276 int32_t onProcess(int64_t framePosition, int32_t numFrames) override { in onProcess() argument
278 (void) numFrames; in onProcess()
282 virtual int32_t read(void *data, int32_t numFrames) = 0;
285 int32_t pull(int32_t numFrames);
DSinkFloat.cpp28 int32_t SinkFloat::read(void *data, int32_t numFrames) { in read() argument
32 int32_t framesLeft = numFrames; in read()
45 return numFrames - framesLeft; in read()
DSinkI16.cpp32 int32_t SinkI16::read(void *data, int32_t numFrames) { in read() argument
36 int32_t framesLeft = numFrames; in read()
57 return numFrames - framesLeft; in read()
/frameworks/av/media/libeffects/downmix/
DEffectDownmix.c338 size_t numFrames = outBuffer->frameCount; in Downmix_Process() local
348 while (numFrames) { in Downmix_Process()
353 numFrames--; in Downmix_Process()
356 while (numFrames) { in Downmix_Process()
361 numFrames--; in Downmix_Process()
370 downmixInputChannelMask, pSrc, pDst, numFrames, accumulate)) { in Downmix_Process()
380 Downmix_foldFromQuad(pSrc, pDst, numFrames, accumulate); in Downmix_Process()
384 Downmix_foldFrom5Point1(pSrc, pDst, numFrames, accumulate); in Downmix_Process()
387 Downmix_foldFrom7Point1(pSrc, pDst, numFrames, accumulate); in Downmix_Process()
391 downmixInputChannelMask, pSrc, pDst, numFrames, accumulate)) { in Downmix_Process()
[all …]
DEffectDownmix.h101 void Downmix_foldFromQuad(LVM_FLOAT *pSrc, LVM_FLOAT *pDst, size_t numFrames, bool accumulate);
102 void Downmix_foldFrom5Point1(LVM_FLOAT *pSrc, LVM_FLOAT *pDst, size_t numFrames, bool accumulate);
103 void Downmix_foldFrom7Point1(LVM_FLOAT *pSrc, LVM_FLOAT *pDst, size_t numFrames, bool accumulate);
105 uint32_t mask, LVM_FLOAT *pSrc, LVM_FLOAT *pDst, size_t numFrames, bool accumulate);
107 void Downmix_foldFromQuad(int16_t *pSrc, int16_t*pDst, size_t numFrames, bool accumulate);
108 void Downmix_foldFrom5Point1(int16_t *pSrc, int16_t*pDst, size_t numFrames, bool accumulate);
109 void Downmix_foldFrom7Point1(int16_t *pSrc, int16_t*pDst, size_t numFrames, bool accumulate);
111 uint32_t mask, int16_t *pSrc, int16_t*pDst, size_t numFrames, bool accumulate);
/frameworks/av/media/libaaudio/tests/
Dtest_atomic_fifo.cpp164 fifo_frames_t bothAvailable = wrappingBuffer.numFrames[0] + wrappingBuffer.numFrames[1]; in verifyWrappingBuffer()
171 bothAvailable = wrappingBuffer.numFrames[0] + wrappingBuffer.numFrames[1]; in verifyWrappingBuffer()
176 EXPECT_GE(wrappingBuffer.numFrames[0], 0); in verifyWrappingBuffer()
177 EXPECT_LE(wrappingBuffer.numFrames[0], capacity); in verifyWrappingBuffer()
178 EXPECT_GE(wrappingBuffer.numFrames[1], 0); in verifyWrappingBuffer()
179 EXPECT_LE(wrappingBuffer.numFrames[1], capacity); in verifyWrappingBuffer()
183 if (wrappingBuffer.numFrames[0]) { in verifyWrappingBuffer()
186 + mFifoBuffer.convertFramesToBytes(wrappingBuffer.numFrames[0]) - 1; in verifyWrappingBuffer()
189 if (wrappingBuffer.numFrames[1]) { in verifyWrappingBuffer()
192 + mFifoBuffer.convertFramesToBytes(wrappingBuffer.numFrames[1]) - 1; in verifyWrappingBuffer()
[all …]
Dtest_aaudio_monkey.cpp46 int32_t numFrames);
171 int32_t numFrames) { in renderAudio() argument
180 mSine1.render(&audioBuffer[0], samplesPerFrame, numFrames); in renderAudio()
183 mSine2.render(&audioBuffer[1], samplesPerFrame, numFrames); in renderAudio()
190 mSine1.render(&audioBuffer[0], samplesPerFrame, numFrames); in renderAudio()
193 mSine2.render(&audioBuffer[1], samplesPerFrame, numFrames); in renderAudio()
215 int32_t numFrames in AAudioMonkeyDataCallback() argument
223 return monkey->renderAudio(stream, audioData, numFrames); in AAudioMonkeyDataCallback()
/frameworks/av/media/libaaudio/src/fifo/
DFifoBuffer.cpp78 wrappingBuffer->numFrames[1] = 0; in fillWrappingBuffer()
86 wrappingBuffer->numFrames[0] = firstFrames; in fillWrappingBuffer()
88 wrappingBuffer->numFrames[1] = framesAvailable - firstFrames; in fillWrappingBuffer()
91 wrappingBuffer->numFrames[0] = framesAvailable; in fillWrappingBuffer()
95 wrappingBuffer->numFrames[0] = 0; in fillWrappingBuffer()
117 fifo_frames_t FifoBuffer::read(void *buffer, fifo_frames_t numFrames) { in read() argument
120 fifo_frames_t framesLeft = numFrames; in read()
128 fifo_frames_t framesAvailable = wrappingBuffer.numFrames[partIndex]; in read()
143 fifo_frames_t framesRead = numFrames - framesLeft; in read()
148 fifo_frames_t FifoBuffer::write(const void *buffer, fifo_frames_t numFrames) { in write() argument
[all …]
DFifoBuffer.h36 int32_t numFrames[SIZE]; member
103 void advanceReadIndex(fifo_frames_t numFrames) { in advanceReadIndex() argument
104 mFifo->advanceReadIndex(numFrames); in advanceReadIndex()
107 void advanceWriteIndex(fifo_frames_t numFrames) { in advanceWriteIndex() argument
108 mFifo->advanceWriteIndex(numFrames); in advanceWriteIndex()
DFifoControllerBase.cpp44 void FifoControllerBase::advanceReadIndex(fifo_frames_t numFrames) { in advanceReadIndex() argument
45 setReadCounter(getReadCounter() + numFrames); in advanceReadIndex()
57 void FifoControllerBase::advanceWriteIndex(fifo_frames_t numFrames) { in advanceWriteIndex() argument
58 setWriteCounter(getWriteCounter() + numFrames); in advanceWriteIndex()
/frameworks/av/media/libaaudio/examples/loopback/src/
DLoopbackAnalyzer.h313 int32_t write(int16_t *inputData, int32_t inputChannelCount, int32_t numFrames) { in write() argument
315 if ((mFrameCounter + numFrames) > mMaxFrames) { in write()
316 numFrames = mMaxFrames - mFrameCounter; in write()
318 for (int i = 0; i < numFrames; i++) { in write()
321 return numFrames; in write()
325 int32_t write(float *inputData, int32_t inputChannelCount, int32_t numFrames) { in write() argument
327 if ((mFrameCounter + numFrames) > mMaxFrames) { in write()
328 numFrames = mMaxFrames - mFrameCounter; in write()
330 for (int i = 0; i < numFrames; i++) { in write()
333 return numFrames; in write()
[all …]
Dloopback.cpp94 void hangIfRequested(int32_t numFrames) { in hangIfRequested()
96 hangCountdownFrames -= numFrames; in hangIfRequested()
129 static int32_t readFormattedData(LoopbackData *myData, int32_t numFrames) { in readFormattedData() argument
133 numFrames, in readFormattedData()
137 numFrames, in readFormattedData()
162 int32_t numFrames in MyDataCallbackProc() argument
172 if (numFrames > myData->inputFramesMaximum) { in MyDataCallbackProc()
177 if (numFrames > myData->maxNumFrames) { in MyDataCallbackProc()
178 myData->maxNumFrames = numFrames; in MyDataCallbackProc()
180 if (numFrames < myData->minNumFrames) { in MyDataCallbackProc()
[all …]
/frameworks/av/media/libaaudio/examples/utils/
DSineGenerator.h38 double numFrames = seconds * mFrameRate; in setSweep() local
39 mUpScaler = pow((frequencyHigh / frequencyLow), (1.0 / numFrames)); in setSweep()
44 void render(int16_t *buffer, int32_t channelStride, int32_t numFrames) { in render() argument
46 for (int i = 0; i < numFrames; i++) { in render()
52 void render(float *buffer, int32_t channelStride, int32_t numFrames) { in render() argument
54 for (int i = 0; i < numFrames; i++) { in render()
DAAudioSimplePlayer.h179 const int numFrames = 32; in prime() local
180 float zeros[numFrames * samplesPerFrame]; in prime()
182 aaudio_result_t result = numFrames; in prime()
183 while (result == numFrames) { in prime()
184 result = AAudioStream_write(mStream, zeros, numFrames, 0); in prime()
312 int32_t numFrames in SimplePlayerDataCallbackProc() argument
353 if (numFrames > sineData->maxNumFrames) { in SimplePlayerDataCallbackProc()
354 sineData->maxNumFrames = numFrames; in SimplePlayerDataCallbackProc()
356 if (numFrames < sineData->minNumFrames) { in SimplePlayerDataCallbackProc()
357 sineData->minNumFrames = numFrames; in SimplePlayerDataCallbackProc()
[all …]
DAAudioSimpleRecorder.h190 const int numFrames = 32; // arbitrary in prime() local
191 float zeros[numFrames * samplesPerFrame]; in prime()
193 aaudio_result_t result = numFrames; in prime()
194 while (result == numFrames) { in prime()
195 result = AAudioStream_write(mStream, zeros, numFrames, 0); in prime()
255 int32_t numFrames in SimpleRecorderDataCallbackProc() argument
272 for (int frameIndex = 0; frameIndex < numFrames; frameIndex++) { in SimpleRecorderDataCallbackProc()
284 for (int frameIndex = 0; frameIndex < numFrames; frameIndex++) { in SimpleRecorderDataCallbackProc()
/frameworks/av/media/libaaudio/src/client/
DAudioStreamInternalPlay.cpp55 int32_t numFrames = kRampMSec * getSampleRate() / AAUDIO_MILLIS_PER_SECOND; in open() local
56 mFlowGraph.setRampLengthInFrames(numFrames); in open()
109 aaudio_result_t AudioStreamInternalPlay::write(const void *buffer, int32_t numFrames, in write() argument
111 return processData((void *)buffer, numFrames, timeoutNanoseconds); in write()
115 aaudio_result_t AudioStreamInternalPlay::processDataNow(void *buffer, int32_t numFrames, in processDataNow() argument
163 int32_t framesWritten = writeNowWithConversion(buffer, numFrames); in processDataNow()
210 int32_t numFrames) { in writeNowWithConversion() argument
213 int32_t framesLeft = numFrames; in writeNowWithConversion()
221 int32_t framesAvailable = wrappingBuffer.numFrames[partIndex]; in writeNowWithConversion()
240 int32_t framesWritten = numFrames - framesLeft; in writeNowWithConversion()
DAudioStreamInternalCapture.cpp60 aaudio_result_t AudioStreamInternalCapture::read(void *buffer, int32_t numFrames, in read() argument
63 return processData(buffer, numFrames, timeoutNanoseconds); in read()
67 aaudio_result_t AudioStreamInternalCapture::processDataNow(void *buffer, int32_t numFrames, in processDataNow() argument
120 int32_t framesProcessed = readNowWithConversion(buffer, numFrames); in processDataNow()
161 int32_t numFrames) { in readNowWithConversion() argument
166 int32_t framesLeft = numFrames; in readNowWithConversion()
173 const int32_t framesAvailable = wrappingBuffer.numFrames[partIndex]; in readNowWithConversion()
209 int32_t framesProcessed = numFrames - framesLeft; in readNowWithConversion()
DAAudioFlowGraph.cpp102 void AAudioFlowGraph::process(const void *source, void *destination, int32_t numFrames) { in process() argument
103 mSource->setData(source, numFrames); in process()
104 mSink->read(destination, numFrames); in process()
114 void AAudioFlowGraph::setRampLengthInFrames(int32_t numFrames) { in setRampLengthInFrames() argument
115 mVolumeRamp->setLengthInFrames(numFrames); in setRampLengthInFrames()
DAudioStreamInternalCapture.h36 int32_t numFrames,
59 int32_t numFrames,
70 aaudio_result_t readNowWithConversion(void *buffer, int32_t numFrames);
/frameworks/native/libs/gui/include/gui/
DOccupancyTracker.h44 numFrames(0), in Segment()
51 numFrames(_numFrames), in Segment()
60 size_t numFrames; member
83 numFrames = 0; in clear()
88 size_t numFrames; member
/frameworks/av/media/libaaudio/src/legacy/
DAudioStreamLegacy.cpp54 int32_t numFrames) { in callDataCallbackFrames() argument
58 incrementFramesRead(numFrames); in callDataCallbackFrames()
59 finalAudioData = (void *) maybeConvertDeviceData(buffer, numFrames); in callDataCallbackFrames()
63 aaudio_data_callback_result_t callbackResult = maybeCallDataCallback(finalAudioData, numFrames); in callDataCallbackFrames()
68 incrementFramesWritten(numFrames); in callDataCallbackFrames()
75 int32_t numFrames = numBytes / getBytesPerDeviceFrame(); in onProcessFixedBlock() local
76 return (int32_t) callDataCallbackFrames(buffer, numFrames); in onProcessFixedBlock()
/frameworks/base/media/java/android/media/
DMediaMetadataRetriever.java498 int frameIndex, int numFrames, @NonNull BitmapParams params) { in getFramesAtIndex() argument
499 return getFramesAtIndexInternal(frameIndex, numFrames, params); in getFramesAtIndex()
523 public @NonNull List<Bitmap> getFramesAtIndex(int frameIndex, int numFrames) { in getFramesAtIndex() argument
524 return getFramesAtIndexInternal(frameIndex, numFrames, null); in getFramesAtIndex()
528 int frameIndex, int numFrames, @Nullable BitmapParams params) { in getFramesAtIndexInternal() argument
534 if (frameIndex < 0 || numFrames < 1 in getFramesAtIndexInternal()
536 || frameIndex > frameCount - numFrames) { in getFramesAtIndexInternal()
538 + frameIndex + ", " + numFrames); in getFramesAtIndexInternal()
540 return _getFrameAtIndex(frameIndex, numFrames, params); in getFramesAtIndexInternal()
544 int frameIndex, int numFrames, @Nullable BitmapParams params); in _getFrameAtIndex() argument
/frameworks/native/libs/gui/
DOccupancyTracker.cpp34 result = parcel->writeUint64(static_cast<uint64_t>(numFrames)); in writeToParcel()
55 numFrames = static_cast<size_t>(uintNumFrames); in readFromParcel()
78 ++mPendingSegment.numFrames; in registerOccupancyChange()
98 if (mPendingSegment.numFrames > LONG_SEGMENT_THRESHOLD) { in recordPendingSegment()
109 mPendingSegment.numFrames, occupancyAverage, usedThirdBuffer}); in recordPendingSegment()
/frameworks/av/media/codec2/components/vorbis/
DC2SoftVorbisDec.cpp399 int numFrames = 0; in process() local
404 numFrames = vorbis_dsp_pcmout( in process()
407 if (numFrames < 0) { in process()
408 ALOGD("vorbis_dsp_pcmout returned %d", numFrames); in process()
409 numFrames = 0; in process()
414 if (numFrames > mNumFramesLeftOnPage) { in process()
415 ALOGV("discarding %d frames at end of page", numFrames - mNumFramesLeftOnPage); in process()
416 numFrames = mNumFramesLeftOnPage; in process()
418 mNumFramesLeftOnPage -= numFrames; in process()
421 if (numFrames) { in process()
[all …]

12345