OSDN Git Service

Consistent whitespace
authorGlenn Kasten <gkasten@google.com>
Wed, 26 Dec 2012 22:43:16 +0000 (14:43 -0800)
committerGlenn Kasten <gkasten@google.com>
Thu, 30 May 2013 20:40:56 +0000 (13:40 -0700)
Change-Id: I118cce68d3b777f9ec9b6bfb70367496422a40f2

media/libmedia/AudioRecord.cpp
media/libmedia/AudioTrack.cpp
media/libmedia/IMediaDeathNotifier.cpp
services/audioflinger/AudioFlinger.cpp
services/audioflinger/Threads.cpp
services/audioflinger/Tracks.cpp

index 40ff1bf..a2b8ae2 100644 (file)
@@ -563,7 +563,7 @@ create_new_record:
                 }
             }
             // read the server count again
-        start_loop_here:
+start_loop_here:
             framesReady = mProxy->framesReady();
         }
         cblk->lock.unlock();
index 5ed8e3b..ff52b28 100644 (file)
@@ -861,7 +861,9 @@ status_t AudioTrack::createTrack_l(
 
         // Ensure that buffer depth covers at least audio hardware latency
         uint32_t minBufCount = afLatency / ((1000 * afFrameCount)/afSampleRate);
-        if (minBufCount < 2) minBufCount = 2;
+        if (minBufCount < 2) {
+            minBufCount = 2;
+        }
 
         size_t minFrameCount = (afFrameCount*sampleRate*minBufCount)/afSampleRate;
         ALOGV("minFrameCount: %u, afFrameCount=%d, minBufCount=%d, sampleRate=%u, afSampleRate=%u"
index 9199db6..9db5b1b 100644 (file)
@@ -49,10 +49,10 @@ IMediaDeathNotifier::getMediaPlayerService()
         } while (true);
 
         if (sDeathNotifier == NULL) {
-        sDeathNotifier = new DeathNotifier();
-    }
-    binder->linkToDeath(sDeathNotifier);
-    sMediaPlayerService = interface_cast<IMediaPlayerService>(binder);
+            sDeathNotifier = new DeathNotifier();
+        }
+        binder->linkToDeath(sDeathNotifier);
+        sMediaPlayerService = interface_cast<IMediaPlayerService>(binder);
     }
     ALOGE_IF(sMediaPlayerService == 0, "no media player service!?");
     return sMediaPlayerService;
index 87eb6aa..a6edb77 100644 (file)
@@ -1453,10 +1453,18 @@ audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module,
         }
         mPlaybackThreads.add(id, thread);
 
-        if (pSamplingRate != NULL) *pSamplingRate = config.sample_rate;
-        if (pFormat != NULL) *pFormat = config.format;
-        if (pChannelMask != NULL) *pChannelMask = config.channel_mask;
-        if (pLatencyMs != NULL) *pLatencyMs = thread->latency();
+        if (pSamplingRate != NULL) {
+            *pSamplingRate = config.sample_rate;
+        }
+        if (pFormat != NULL) {
+            *pFormat = config.format;
+        }
+        if (pChannelMask != NULL) {
+            *pChannelMask = config.channel_mask;
+        }
+        if (pLatencyMs != NULL) {
+            *pLatencyMs = thread->latency();
+        }
 
         // notify client processes of the new output creation
         thread->audioConfigChanged_l(AudioSystem::OUTPUT_OPENED);
@@ -1698,9 +1706,15 @@ audio_io_handle_t AudioFlinger::openInput(audio_module_handle_t module,
                                   );
         mRecordThreads.add(id, thread);
         ALOGV("openInput() created record thread: ID %d thread %p", id, thread);
-        if (pSamplingRate != NULL) *pSamplingRate = reqSamplingRate;
-        if (pFormat != NULL) *pFormat = config.format;
-        if (pChannelMask != NULL) *pChannelMask = reqChannels;
+        if (pSamplingRate != NULL) {
+            *pSamplingRate = reqSamplingRate;
+        }
+        if (pFormat != NULL) {
+            *pFormat = config.format;
+        }
+        if (pChannelMask != NULL) {
+            *pChannelMask = reqChannels;
+        }
 
         // notify client processes of the new input creation
         thread->audioConfigChanged_l(AudioSystem::INPUT_OPENED);
index 7e9550c..213688e 100644 (file)
@@ -1716,7 +1716,7 @@ void AudioFlinger::PlaybackThread::cacheParameters_l()
 
 void AudioFlinger::PlaybackThread::invalidateTracks(audio_stream_type_t streamType)
 {
-    ALOGV ("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d",
+    ALOGV("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d",
             this,  streamType, mTracks.size());
     Mutex::Autolock _l(mLock);
 
@@ -3970,6 +3970,7 @@ status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrac
         ALOGV("Record started OK");
         return status;
     }
+
 startError:
     AudioSystem::stopInput(mId);
     clearSyncStartEvent();
index 5ac3129..41a763d 100644 (file)
@@ -1477,7 +1477,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr
                     memset(pInBuffer->raw, 0, startFrames * channelCount * sizeof(int16_t));
                     mBufferQueue.add(pInBuffer);
                 } else {
-                    ALOGW ("OutputTrack::write() %p no more buffers in queue", this);
+                    ALOGW("OutputTrack::write() %p no more buffers in queue", this);
                 }
             }
         }
@@ -1499,7 +1499,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr
             mOutBuffer.frameCount = pInBuffer->frameCount;
             nsecs_t startTime = systemTime();
             if (obtainBuffer(&mOutBuffer, waitTimeLeftMs) == (status_t)NO_MORE_BUFFERS) {
-                ALOGV ("OutputTrack::write() %p thread %p no more output buffers", this,
+                ALOGV("OutputTrack::write() %p thread %p no more output buffers", this,
                         mThread.unsafe_get());
                 outputBufferFull = true;
                 break;