Lines Matching refs:buffer
86 // retry counts for buffer fill timeout
95 // don't warn about blocked writes or record buffer overflows more often than this
109 // minimum normal mix buffer size, expressed in milliseconds rather than frames
111 // maximum normal mix buffer size
120 // multiplier is calculated based on min & max normal mixer buffer size
122 // multiplier is calculated based on min & max normal mixer buffer size
404 char buffer[SIZE];
409 snprintf(buffer, SIZE, "thread %p maybe dead locked\n", this);
410 write(fd, buffer, strlen(buffer));
413 snprintf(buffer, SIZE, "io handle: %d\n", mId);
414 result.append(buffer);
415 snprintf(buffer, SIZE, "TID: %d\n", getTid());
416 result.append(buffer);
417 snprintf(buffer, SIZE, "standby: %d\n", mStandby);
418 result.append(buffer);
419 snprintf(buffer, SIZE, "Sample rate: %u\n", mSampleRate);
420 result.append(buffer);
421 snprintf(buffer, SIZE, "HAL frame count: %d\n", mFrameCount);
422 result.append(buffer);
423 snprintf(buffer, SIZE, "Normal frame count: %d\n", mNormalFrameCount);
424 result.append(buffer);
425 snprintf(buffer, SIZE, "Channel Count: %d\n", mChannelCount);
426 result.append(buffer);
427 snprintf(buffer, SIZE, "Channel Mask: 0x%08x\n", mChannelMask);
428 result.append(buffer);
429 snprintf(buffer, SIZE, "Format: %d\n", mFormat);
430 result.append(buffer);
431 snprintf(buffer, SIZE, "Frame size: %u\n", mFrameSize);
432 result.append(buffer);
434 snprintf(buffer, SIZE, "\nPending setParameters commands: \n");
435 result.append(buffer);
438 snprintf(buffer, SIZE, "\n %02d ", i);
439 result.append(buffer);
443 snprintf(buffer, SIZE, "\n\nPending config events: \n");
444 result.append(buffer);
446 mConfigEvents[i]->dump(buffer, SIZE);
447 result.append(buffer);
461 char buffer[SIZE];
464 snprintf(buffer, SIZE, "\n- %d Effect Chains:\n", mEffectChains.size());
465 write(fd, buffer, strlen(buffer));
991 char buffer[SIZE];
1009 snprintf(buffer, SIZE, "Output thread %p tracks\n", this);
1010 result.append(buffer);
1015 track->dump(buffer, SIZE);
1016 result.append(buffer);
1020 snprintf(buffer, SIZE, "Output thread %p active tracks\n", this);
1021 result.append(buffer);
1026 track->dump(buffer, SIZE);
1027 result.append(buffer);
1041 char buffer[SIZE];
1044 snprintf(buffer, SIZE, "\nOutput thread %p internals\n", this);
1045 result.append(buffer);
1046 snprintf(buffer, SIZE, "last write occurred (msecs): %llu\n",
1048 result.append(buffer);
1049 snprintf(buffer, SIZE, "total writes: %d\n", mNumWrites);
1050 result.append(buffer);
1051 snprintf(buffer, SIZE, "delayed writes: %d\n", mNumDelayedWrites);
1052 result.append(buffer);
1053 snprintf(buffer, SIZE, "blocked in write: %d\n", mInWrite);
1054 result.append(buffer);
1055 snprintf(buffer, SIZE, "suspend count: %d\n", mSuspended);
1056 result.append(buffer);
1057 snprintf(buffer, SIZE, "mix buffer : %p\n", mMixBuffer);
1058 result.append(buffer);
1117 // use case 1: shared buffer with any frame count
1158 // For compatibility with AudioTrack calculation, buffer depth is forced
1234 ALOGV("createTrack_l() setting main buffer %p", chain->inBuffer());
1323 // set retry count for buffer fill
1434 ALOGW("HAL output buffer size is %u frames but AudioMixer requires multiples of 16 frames",
1438 // Calculate size of normal mix buffer relative to the HAL output buffer size
1461 // SRC (it would be unusual for the normal mix buffer size to not be a multiple of fast
1477 ALOGI("HAL output buffer size %u frames, normal mix buffer size %u frames", mFrameCount,
1484 // force reconfiguration of effect chains and engines to take new buffer size and audio
1732 int16_t *buffer = mMixBuffer;
1738 // the mix buffer as input
1741 buffer = new int16_t[numSamples];
1742 memset(buffer, 0, numSamples * sizeof(int16_t));
1743 ALOGV("addEffectChain_l() creating new input buffer %p session %d", buffer, session);
1751 ALOGV("addEffectChain_l() track->setMainBuffer track %p buffer %p", track.get(),
1752 buffer);
1753 track->setMainBuffer(buffer);
1771 chain->setInBuffer(buffer, ownsBuffer);
1937 // we're about to wait, flush the binder command buffer
2332 // obtain the presentation timestamp of the next output buffer
2363 // buffer size, then write 0s to the output
2371 // starving the audio HAL. As activeSleepTimeUs() is larger than a buffer
2593 // make sure that we have enough frames to mix one full buffer.
2594 // enforce this condition only once to enable draining the buffer in case the client
2609 // the minimum track buffer size is normally twice the number of frames necessary
2610 // to fill one buffer and the resampler should not leave more than one buffer worth
2770 // clear effect chain input buffer if an active track underruns to avoid sending
2771 // previous audio buffer again to effects
2783 // TODO: use actual buffer filling status instead of latency when available from
2796 // fill a buffer, then remove it from active list.
2798 ALOGI("BUFFER TIMEOUT: remove(%d) from active list on thread %p", name, this);
2883 // mix buffer must be cleared if all tracks are connected to an
2885 // mix buffer and track effects will accumulate into it
2958 // do not accept frame count changes if tracks are open as the track buffer
3054 char buffer[SIZE];
3059 snprintf(buffer, SIZE, "AudioMixer tracks: %08x\n", mAudioMixer->trackNames());
3060 result.append(buffer);
3215 // clear effect chain input buffer if the last active track started underruns
3216 // to avoid sending previous audio buffer again to effects
3237 // fill a buffer, then remove it from active list.
3240 ALOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name());
3271 AudioBufferProvider::Buffer buffer;
3276 buffer.frameCount = frameCount;
3277 mActiveTrack->getNextBuffer(&buffer);
3278 if (CC_UNLIKELY(buffer.raw == NULL)) {
3282 memcpy(curBuf, buffer.raw, buffer.frameCount * mFrameSize);
3283 frameCount -= buffer.frameCount;
3284 curBuf += buffer.frameCount * mFrameSize;
3285 mActiveTrack->releaseBuffer(&buffer);
3331 // do not accept frame count changes if tracks are open as the track buffer
3623 AudioBufferProvider::Buffer buffer;
3697 buffer.frameCount = mFrameCount;
3698 if (CC_LIKELY(mActiveTrack->getNextBuffer(&buffer) == NO_ERROR)) {
3700 size_t framesOut = buffer.frameCount;
3707 int8_t *dst = buffer.i8 + (buffer.frameCount - framesOut) *
3731 readInto = buffer.raw;
3750 buffer.frameCount = 0;
3776 downmix_to_mono_i16_from_stereo_i16(buffer.i16, (int16_t *)mRsmpOutBuffer,
3779 ditherAndClamp((int32_t *)buffer.raw, mRsmpOutBuffer, framesOut);
3784 mActiveTrack->releaseBuffer(&buffer);
3787 mFramestoDrop -= buffer.frameCount;
3792 mFramestoDrop += buffer.frameCount;
3810 ALOGW("RecordThread: buffer overflow");
3814 // Release the processor for a while before asking for a new buffer.
3815 // This will give the application more chance to read from the buffer and
4000 // TODO: use actual buffer filling status instead of 2 buffers when info is available
4081 char buffer[SIZE];
4084 snprintf(buffer, SIZE, "\nInput thread %p internals\n", this);
4085 result.append(buffer);
4088 snprintf(buffer, SIZE, "In index: %d\n", mRsmpInIndex);
4089 result.append(buffer);
4090 snprintf(buffer, SIZE, "In size: %d\n", mInputBytes);
4091 result.append(buffer);
4092 snprintf(buffer, SIZE, "Resampling: %d\n", (mResampler != NULL));
4093 result.append(buffer);
4094 snprintf(buffer, SIZE, "Out channel count: %u\n", mReqChannelCount);
4095 result.append(buffer);
4096 snprintf(buffer, SIZE, "Out sample rate: %u\n", mReqSampleRate);
4097 result.append(buffer);
4110 char buffer[SIZE];
4113 snprintf(buffer, SIZE, "Input thread %p tracks\n", this);
4114 result.append(buffer);
4119 track->dump(buffer, SIZE);
4120 result.append(buffer);
4125 snprintf(buffer, SIZE, "\nInput thread %p active tracks\n", this);
4126 result.append(buffer);
4128 mActiveTrack->dump(buffer, SIZE);
4129 result.append(buffer);
4136 status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts)
4138 size_t framesReq = buffer->frameCount;
4152 buffer->raw = NULL;
4153 buffer->frameCount = 0;
4169 buffer->raw = mRsmpInBuffer + mRsmpInIndex * channelCount;
4170 buffer->frameCount = framesReq;
4175 void AudioFlinger::RecordThread::releaseBuffer(AudioBufferProvider::Buffer* buffer)
4177 mRsmpInIndex += buffer->frameCount;
4178 buffer->frameCount = 0;
4207 // do not accept frame count changes if tracks are open as the track buffer