diff options
author | Glenn Kasten <gkasten@google.com> | 2012-02-24 15:42:17 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-02-24 16:34:43 -0800 |
commit | 0fccd35b32a70f3c302ef755d74e0fe0437102ec (patch) | |
tree | 4a0de0044ae6e867248d7adc716b869c047070e4 /services/audioflinger | |
parent | 2521a0197065e5ff0335199becc5a84de295fd09 (diff) | |
download | frameworks_base-0fccd35b32a70f3c302ef755d74e0fe0437102ec.zip frameworks_base-0fccd35b32a70f3c302ef755d74e0fe0437102ec.tar.gz frameworks_base-0fccd35b32a70f3c302ef755d74e0fe0437102ec.tar.bz2 |
AudioFlinger const methods and parameters
Change-Id: I93ec28024005ed23aa141518092a012a4a7c44c5
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 8 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index d522091..4cc2914 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -3281,7 +3281,7 @@ void AudioFlinger::DuplicatingThread::updateWaitTime() } -bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp<OutputTrack> > &outputTracks) +bool AudioFlinger::DuplicatingThread::outputsReady(const SortedVector< sp<OutputTrack> > &outputTracks) { for (size_t i = 0; i < outputTracks.size(); i++) { sp <ThreadBase> thread = outputTracks[i]->thread().promote(); @@ -5859,7 +5859,7 @@ uint32_t AudioFlinger::nextUniqueId() return android_atomic_inc(&mNextUniqueId); } -AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l() +AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l() const { for (size_t i = 0; i < mPlaybackThreads.size(); i++) { PlaybackThread *thread = mPlaybackThreads.valueAt(i).get(); @@ -5871,7 +5871,7 @@ AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l() return NULL; } -uint32_t AudioFlinger::primaryOutputDevice_l() +uint32_t AudioFlinger::primaryOutputDevice_l() const { PlaybackThread *thread = primaryPlaybackThread_l(); @@ -6366,7 +6366,7 @@ void AudioFlinger::ThreadBase::lockEffectChains_l( } void AudioFlinger::ThreadBase::unlockEffectChains( - Vector<sp <AudioFlinger::EffectChain> >& effectChains) + const Vector<sp <AudioFlinger::EffectChain> >& effectChains) { for (size_t i = 0; i < effectChains.size(); i++) { effectChains[i]->unlock(); diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 2a5d805..b5fef52 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -424,8 +424,8 @@ private: void sendConfigEvent_l(int event, int param = 0); void processConfigEvents(); audio_io_handle_t id() const { return mId;} - bool standby() { return mStandby; } - uint32_t device() { return mDevice; } + bool standby() const { return mStandby; } + uint32_t device() const { return mDevice; } virtual audio_stream_t* stream() = 0; sp<EffectHandle> createEffect_l( @@ -461,7 +461,7 @@ private: // integrity of the chains during the process. void lockEffectChains_l(Vector<sp <EffectChain> >& effectChains); // unlock effect chains after process - void unlockEffectChains(Vector<sp <EffectChain> >& effectChains); + void unlockEffectChains(const Vector<sp<EffectChain> >& effectChains); // set audio mode to all effect chains void setMode(audio_mode_t mode); // get effect module with corresponding ID on specified audio session @@ -968,7 +968,7 @@ private: virtual uint32_t activeSleepTimeUs(); private: - bool outputsReady(SortedVector< sp<OutputTrack> > &outputTracks); + bool outputsReady(const SortedVector<sp<OutputTrack> > &outputTracks); void updateWaitTime(); SortedVector < sp<OutputTrack> > mOutputTracks; @@ -993,8 +993,9 @@ private: PlaybackThread *srcThread, PlaybackThread *dstThread, bool reRegister); - PlaybackThread *primaryPlaybackThread_l(); - uint32_t primaryOutputDevice_l(); + // return thread associated with primary hardware device, or NULL + PlaybackThread *primaryPlaybackThread_l() const; + uint32_t primaryOutputDevice_l() const; friend class AudioBuffer; |