summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-07-29 18:18:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-07-29 18:18:05 +0000
commit2eeca1f8e18106d118f7268cb9d8597539685c5c (patch)
tree28b2c665c838d4e78265c74c284694f85a77a579 /services/audioflinger
parentb59c1ad726b8bdf441f373d0bdc612539769334a (diff)
parent34542acfa25c6413c87a94b6f7cc315a0c496277 (diff)
downloadframeworks_av-2eeca1f8e18106d118f7268cb9d8597539685c5c.zip
frameworks_av-2eeca1f8e18106d118f7268cb9d8597539685c5c.tar.gz
frameworks_av-2eeca1f8e18106d118f7268cb9d8597539685c5c.tar.bz2
Merge "Move local variable declarations to point of first use"
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/AudioFlinger.cpp3
-rw-r--r--services/audioflinger/Threads.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 712772b..cc5af87 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1410,7 +1410,6 @@ audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module,
audio_output_flags_t flags,
const audio_offload_info_t *offloadInfo)
{
- status_t status;
PlaybackThread *thread = NULL;
struct audio_config config;
config.sample_rate = (pSamplingRate != NULL) ? *pSamplingRate : 0;
@@ -1448,7 +1447,7 @@ audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module,
mHardwareStatus = AUDIO_HW_OUTPUT_OPEN;
- status = hwDevHal->open_output_stream(hwDevHal,
+ status_t status = hwDevHal->open_output_stream(hwDevHal,
id,
*pDevices,
(audio_output_flags_t)flags,
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 6cd8da8..0fc31f6 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -3547,11 +3547,11 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep
void AudioFlinger::DirectOutputThread::threadLoop_mix()
{
- AudioBufferProvider::Buffer buffer;
size_t frameCount = mFrameCount;
int8_t *curBuf = (int8_t *)mMixBuffer;
// output audio to hardware
while (frameCount) {
+ AudioBufferProvider::Buffer buffer;
buffer.frameCount = frameCount;
mActiveTrack->getNextBuffer(&buffer);
if (CC_UNLIKELY(buffer.raw == NULL)) {