summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-27 15:26:23 -0800
committerGlenn Kasten <gkasten@google.com>2012-02-17 09:41:56 -0800
commit3b81acab52b7140c1b8b20be2d67be3e221637e7 (patch)
tree0b225360603f19ba2f60fb1cf7a616dfe51d99b1 /services/audioflinger/AudioMixer.cpp
parent1b094ee8f7fe7eca65bf3d2f983ba95eef6db93d (diff)
downloadframeworks_av-3b81acab52b7140c1b8b20be2d67be3e221637e7.zip
frameworks_av-3b81acab52b7140c1b8b20be2d67be3e221637e7.tar.gz
frameworks_av-3b81acab52b7140c1b8b20be2d67be3e221637e7.tar.bz2
Remove bit fields to improve performance
uint16_t enabled is (mostly) changed to bool in a separate CL Change-Id: Ied9f8c034b2479cee9a8778cee7b8ff92ae75b7b
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r--services/audioflinger/AudioMixer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index f3bf953..020d62a 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -257,6 +257,7 @@ void AudioMixer::setParameter(int name, int target, int param, void *value)
}
break;
case AUXLEVEL:
+ //assert(0 <= valueInt && valueInt <= MAX_GAIN_INT);
if (track.auxLevel != valueInt) {
ALOGV("setParameter(VOLUME, AUXLEVEL: %04x)", valueInt);
track.prevAuxLevel = track.auxLevel << 16;
@@ -565,7 +566,7 @@ void AudioMixer::volumeStereo(track_t* t, int32_t* out, size_t frameCount, int32
const int16_t vr = t->volume[1];
if (CC_UNLIKELY(aux != NULL)) {
- const int16_t va = (int16_t)t->auxLevel;
+ const int16_t va = t->auxLevel;
do {
int16_t l = (int16_t)(*temp++ >> 12);
int16_t r = (int16_t)(*temp++ >> 12);