diff options
author | Andy Hung <hunga@google.com> | 2014-02-28 22:28:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-28 22:28:45 +0000 |
commit | eafbe37da9a08f7599281bc19e000cdf70ae08b6 (patch) | |
tree | 597dadfb75a959a5d4ee9a523c19bb8b41bcdade /services | |
parent | 625b57c5ab5fefde1547d89a061420be733fb7dd (diff) | |
parent | 09a5007b17acb49d25cfa386a2e2534d942e8854 (diff) | |
download | frameworks_av-eafbe37da9a08f7599281bc19e000cdf70ae08b6.zip frameworks_av-eafbe37da9a08f7599281bc19e000cdf70ae08b6.tar.gz frameworks_av-eafbe37da9a08f7599281bc19e000cdf70ae08b6.tar.bz2 |
Merge "Rename constants for MixBufferSize to SinkBufferSize"
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/Threads.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index d278008..922c6a6 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -104,10 +104,10 @@ static const uint32_t kMinThreadSleepTimeUs = 5000; // maximum divider applied to the active sleep time in the mixer thread loop static const uint32_t kMaxThreadSleepTimeShift = 2; -// minimum normal mix buffer size, expressed in milliseconds rather than frames -static const uint32_t kMinNormalMixBufferSizeMs = 20; -// maximum normal mix buffer size -static const uint32_t kMaxNormalMixBufferSizeMs = 24; +// minimum normal sink buffer size, expressed in milliseconds rather than frames +static const uint32_t kMinNormalSinkBufferSizeMs = 20; +// maximum normal sink buffer size +static const uint32_t kMaxNormalSinkBufferSizeMs = 24; // Offloaded output thread standby delay: allows track transition without going to standby static const nsecs_t kOffloadStandbyDelayNs = seconds(1); @@ -1716,12 +1716,12 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() } } - // Calculate size of normal mix buffer relative to the HAL output buffer size + // Calculate size of normal sink buffer relative to the HAL output buffer size double multiplier = 1.0; if (mType == MIXER && (kUseFastMixer == FastMixer_Static || kUseFastMixer == FastMixer_Dynamic)) { - size_t minNormalFrameCount = (kMinNormalMixBufferSizeMs * mSampleRate) / 1000; - size_t maxNormalFrameCount = (kMaxNormalMixBufferSizeMs * mSampleRate) / 1000; + size_t minNormalFrameCount = (kMinNormalSinkBufferSizeMs * mSampleRate) / 1000; + size_t maxNormalFrameCount = (kMaxNormalSinkBufferSizeMs * mSampleRate) / 1000; // round up minimum and round down maximum to nearest 16 frames to satisfy AudioMixer minNormalFrameCount = (minNormalFrameCount + 15) & ~15; maxNormalFrameCount = maxNormalFrameCount & ~15; @@ -1739,7 +1739,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() } } else { // prefer an even multiplier, for compatibility with doubling of fast tracks due to HAL - // SRC (it would be unusual for the normal mix buffer size to not be a multiple of fast + // SRC (it would be unusual for the normal sink buffer size to not be a multiple of fast // track, but we sometimes have to do this to satisfy the maximum frame count // constraint) // FIXME this rounding up should not be done if no HAL SRC @@ -1755,7 +1755,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() mNormalFrameCount = multiplier * mFrameCount; // round up to nearest 16 frames to satisfy AudioMixer mNormalFrameCount = (mNormalFrameCount + 15) & ~15; - ALOGI("HAL output buffer size %u frames, normal mix buffer size %u frames", mFrameCount, + ALOGI("HAL output buffer size %u frames, normal sink buffer size %u frames", mFrameCount, mNormalFrameCount); delete[] mSinkBuffer; |