Home
last modified time | relevance | path

Searched refs:audioBuffer (Results 1 – 18 of 18) sorted by relevance

/frameworks/av/media/libaaudio/src/legacy/
DAudioStreamLegacy.cpp94 AudioTrack::Buffer *audioBuffer = static_cast<AudioTrack::Buffer *>(info); in processCallbackCommon() local
99 audioBuffer->size = SIZE_STOP_CALLBACKS; in processCallbackCommon()
105 audioBuffer->size = 0; in processCallbackCommon()
107 if (audioBuffer->frameCount == 0) { in processCallbackCommon()
114 int32_t byteCount = audioBuffer->frameCount * getBytesPerDeviceFrame(); in processCallbackCommon()
116 (uint8_t *) audioBuffer->raw, byteCount); in processCallbackCommon()
119 callbackResult = callDataCallbackFrames((uint8_t *)audioBuffer->raw, in processCallbackCommon()
120 audioBuffer->frameCount); in processCallbackCommon()
123 audioBuffer->size = audioBuffer->frameCount * getBytesPerDeviceFrame(); in processCallbackCommon()
131 audioBuffer->size = 0; in processCallbackCommon()
/frameworks/base/media/java/android/media/
DMediaSync.java131 @NonNull MediaSync sync, @NonNull ByteBuffer audioBuffer, int bufferId); in onAudioBufferConsumed() argument
536 AudioBuffer audioBuffer = mAudioBuffers.get(0); in postRenderAudio()
537 int size = audioBuffer.mByteBuffer.remaining(); in postRenderAudio()
547 audioBuffer.mByteBuffer, in postRenderAudio()
551 if (audioBuffer.mPresentationTimeUs != -1) { in postRenderAudio()
553 size, audioBuffer.mPresentationTimeUs); in postRenderAudio()
554 audioBuffer.mPresentationTimeUs = -1; in postRenderAudio()
558 postReturnByteBuffer(audioBuffer); in postRenderAudio()
579 private final void postReturnByteBuffer(@NonNull final AudioBuffer audioBuffer) { in postReturnByteBuffer() argument
596 callback.onAudioBufferConsumed(sync, audioBuffer.mByteBuffer, in postReturnByteBuffer()
[all …]
DAudioRecord.java1577 public int read(@NonNull ByteBuffer audioBuffer, int sizeInBytes) { in read() argument
1578 return read(audioBuffer, sizeInBytes, READ_BLOCKING); in read()
1610 public int read(@NonNull ByteBuffer audioBuffer, int sizeInBytes, @ReadMode int readMode) { in read() argument
1620 if ( (audioBuffer == null) || (sizeInBytes < 0) ) { in read()
1624 return native_read_in_direct_buffer(audioBuffer, sizeInBytes, readMode == READ_BLOCKING); in read()
/frameworks/av/media/libaudioclient/
DAudioRecord.cpp985 status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount, size_t *nonContig) in obtainBuffer() argument
987 if (audioBuffer == NULL) { in obtainBuffer()
994 audioBuffer->frameCount = 0; in obtainBuffer()
995 audioBuffer->size = 0; in obtainBuffer()
996 audioBuffer->raw = NULL; in obtainBuffer()
1018 return obtainBuffer(audioBuffer, requested, NULL /*elapsed*/, nonContig); in obtainBuffer()
1021 status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, const struct timespec *requested, in obtainBuffer() argument
1071 buffer.mFrameCount = audioBuffer->frameCount; in obtainBuffer()
1077 audioBuffer->frameCount = buffer.mFrameCount; in obtainBuffer()
1078 audioBuffer->size = buffer.mFrameCount * mFrameSize; in obtainBuffer()
[all …]
DAudioTrack.cpp1946 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount, size_t *nonContig) in obtainBuffer() argument
1948 if (audioBuffer == NULL) { in obtainBuffer()
1955 audioBuffer->frameCount = 0; in obtainBuffer()
1956 audioBuffer->size = 0; in obtainBuffer()
1957 audioBuffer->raw = NULL; in obtainBuffer()
1979 return obtainBuffer(audioBuffer, requested, NULL /*elapsed*/, nonContig); in obtainBuffer()
1982 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, const struct timespec *requested, in obtainBuffer() argument
2042 buffer.mFrameCount = audioBuffer->frameCount; in obtainBuffer()
2047 audioBuffer->frameCount = buffer.mFrameCount; in obtainBuffer()
2048 audioBuffer->size = buffer.mFrameCount * mFrameSize; in obtainBuffer()
[all …]
/frameworks/av/media/libaaudio/examples/utils/
DAAudioSimplePlayer.h365 int16_t *audioBuffer = (int16_t *) audioData; in SimplePlayerDataCallbackProc() local
367 sineData->sineOscillators[i].render(&audioBuffer[i], in SimplePlayerDataCallbackProc()
373 float *audioBuffer = (float *) audioData; in SimplePlayerDataCallbackProc() local
375 sineData->sineOscillators[i].render(&audioBuffer[i], in SimplePlayerDataCallbackProc()
381 uint8_t *audioBuffer = (uint8_t *) audioData; in SimplePlayerDataCallbackProc() local
384 sineData->sineOscillators[i].render24(&audioBuffer[i * bytesPerSample], in SimplePlayerDataCallbackProc()
390 int32_t *audioBuffer = (int32_t *) audioData; in SimplePlayerDataCallbackProc() local
392 sineData->sineOscillators[i].render(&audioBuffer[i], in SimplePlayerDataCallbackProc()
DAAudioSimpleRecorder.h270 int16_t *audioBuffer = (int16_t *) audioData; in SimpleRecorderDataCallbackProc() local
273 sample = audioBuffer[frameIndex * samplesPerFrame] * (1.0/32768); in SimpleRecorderDataCallbackProc()
282 float *audioBuffer = (float *) audioData; in SimpleRecorderDataCallbackProc() local
285 sample = audioBuffer[frameIndex * samplesPerFrame]; in SimpleRecorderDataCallbackProc()
/frameworks/av/media/libaaudio/tests/
Dtest_aaudio_monkey.cpp196 int16_t *audioBuffer = (int16_t *) audioData; in renderAudio() local
198 mSine1.render(&audioBuffer[0], samplesPerFrame, numFrames); in renderAudio()
201 mSine2.render(&audioBuffer[1], samplesPerFrame, numFrames); in renderAudio()
206 float *audioBuffer = (float *) audioData; in renderAudio() local
208 mSine1.render(&audioBuffer[0], samplesPerFrame, numFrames); in renderAudio()
211 mSine2.render(&audioBuffer[1], samplesPerFrame, numFrames); in renderAudio()
/frameworks/av/media/libaudiohal/include/media/audiohal/
DEffectBufferHalInterface.h33 virtual audio_buffer_t* audioBuffer() = 0;
38 return externalData() != nullptr ? externalData() : audioBuffer()->raw; in ptr()
/frameworks/av/media/libstagefright/
DAudioSource.cpp362 status_t AudioSource::dataCallback(const AudioRecord::Buffer& audioBuffer) { in dataCallback() argument
392 const size_t bufferSize = audioBuffer.size; in dataCallback()
430 CHECK_EQ(audioBuffer.size & 1, 0u); in dataCallback()
452 if (audioBuffer.size == 0) { in dataCallback()
459 audioBuffer.i16, audioBuffer.size); in dataCallback()
/frameworks/av/media/libaudiohal/impl/
DEffectHalHidl.cpp81 mBuffersChanged = buffer->audioBuffer() != mInBuffer->audioBuffer(); in setInBuffer()
93 mBuffersChanged = buffer->audioBuffer() != mOutBuffer->audioBuffer(); in setOutBuffer()
DEffectBufferHalHidl.h41 virtual audio_buffer_t* audioBuffer();
DEffectBufferHalHidl.cpp100 audio_buffer_t* EffectBufferHalHidl::audioBuffer() { in audioBuffer() function in android::effect::CPP_VERSION::EffectBufferHalHidl
/frameworks/av/media/libaudioclient/include/media/
DAudioRecord.h467 status_t obtainBuffer(Buffer* audioBuffer, int32_t waitCount,
532 status_t obtainBuffer(Buffer* audioBuffer, const struct timespec *requested,
544 void releaseBuffer(const Buffer* audioBuffer);
DAudioTrack.h794 status_t obtainBuffer(Buffer* audioBuffer, int32_t waitCount,
807 status_t obtainBuffer(Buffer* audioBuffer, const struct timespec *requested,
819 void releaseBuffer(const Buffer* audioBuffer);
/frameworks/av/services/audioflinger/
DEffects.cpp744 inBuffer->audioBuffer()->f32, mInChannelCountRequested, in process()
745 mInConversionBuffer->audioBuffer()->f32, inChannelCount, in process()
754 outBuffer->audioBuffer()->f32, mOutChannelCountRequested, in process()
755 mOutConversionBuffer->audioBuffer()->f32, outChannelCount, in process()
768 mInConversionBuffer->audioBuffer()->s16, in process()
769 inBuffer->audioBuffer()->f32, in process()
779 mOutConversionBuffer->audioBuffer()->s16, in process()
780 outBuffer->audioBuffer()->f32, in process()
794 target->audioBuffer()->f32, in process()
795 mOutConversionBuffer->audioBuffer()->s16, in process()
[all …]
DThreads.cpp3357 buffer = halInBuffer->audioBuffer()->f32; in addEffectChain_l()
3359 buffer = halInBuffer->audioBuffer()->s16; in addEffectChain_l()
/frameworks/av/media/libaudioclient/fuzzer/
Daudioflinger_fuzzer.cpp351 android::AudioRecord::Buffer audioBuffer; in invokeAudioRecord() local
354 audioBuffer.frameCount = static_cast<size_t>(mFdp.ConsumeIntegral<uint32_t>()); in invokeAudioRecord()
355 record->obtainBuffer(&audioBuffer, waitCount, &nonContig); in invokeAudioRecord()
357 record->read(audioBuffer.raw, audioBuffer.size, blocking); in invokeAudioRecord()
363 record->releaseBuffer(&audioBuffer); in invokeAudioRecord()