summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-02 14:06:11 -0800
committerGlenn Kasten <gkasten@google.com>2012-02-03 15:25:24 -0800
commitc59c004a3a6042c0990d71179f88eee2ce781e3c (patch)
tree68e0c9bb6d5bb10a1a8263ebefbb5601946702ee /services/audioflinger/AudioMixer.cpp
parent787bae0578fbaab6219ebf23494866b224d01438 (diff)
downloadframeworks_av-c59c004a3a6042c0990d71179f88eee2ce781e3c.zip
frameworks_av-c59c004a3a6042c0990d71179f88eee2ce781e3c.tar.gz
frameworks_av-c59c004a3a6042c0990d71179f88eee2ce781e3c.tar.bz2
AudioFlinger methods const and inline
This saves 1063 bytes and probably improves performance. Change-Id: I11cf0dfd925fbaec75e3d1b806852a538eae5518
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r--services/audioflinger/AudioMixer.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 0b9f8ba..fe733d9 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -296,18 +296,6 @@ bool AudioMixer::track_t::setResampler(uint32_t value, uint32_t devSampleRate)
return false;
}
-bool AudioMixer::track_t::doesResample() const
-{
- return resampler != NULL;
-}
-
-void AudioMixer::track_t::resetResampler()
-{
- if (resampler != NULL) {
- resampler->reset();
- }
-}
-
inline
void AudioMixer::track_t::adjustVolumeRamp(bool aux)
{
@@ -327,20 +315,11 @@ void AudioMixer::track_t::adjustVolumeRamp(bool aux)
}
}
-size_t AudioMixer::track_t::getUnreleasedFrames()
-{
- if (resampler != NULL) {
- return resampler->getUnreleasedFrames();
- }
- return 0;
-}
-
-size_t AudioMixer::getUnreleasedFrames(int name)
+size_t AudioMixer::getUnreleasedFrames(int name) const
{
name -= TRACK0;
if (uint32_t(name) < MAX_NUM_TRACKS) {
- track_t& track(mState.tracks[name]);
- return track.getUnreleasedFrames();
+ return mState.tracks[name].getUnreleasedFrames();
}
return 0;
}