summaryrefslogtreecommitdiffstats
path: root/media/libeffects/downmix
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2012-04-04 18:54:36 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2012-04-09 11:27:14 -0700
commit7d5b26230a179cd7bcc01f6578cd80d8c15a92a5 (patch)
tree563086c1185e0e54770d8c60c8eec1aefdddb89f /media/libeffects/downmix
parent4b75a9c8b93a90749bc5d22912ad0d96c12f4ecf (diff)
downloadframeworks_av-7d5b26230a179cd7bcc01f6578cd80d8c15a92a5.zip
frameworks_av-7d5b26230a179cd7bcc01f6578cd80d8c15a92a5.tar.gz
frameworks_av-7d5b26230a179cd7bcc01f6578cd80d8c15a92a5.tar.bz2
AudioMixer uses downmix effect for multichannel content
In the AudioMixer structure associated with each track, add an object that acts as the buffer provider when the track has more than two channels of input in the mixer. This object, DownmixerBufferProvider, gets audio from the actual buffer provider of the track, and applies a downmix effect on it. The downmix effect is created and configured when the track gets created in AudioFlinger, which causes AudioMixer::getTrackName() to be called with the new track's channel mask. It is released when the track is disabled in the mixer. Change-Id: I05281ed5f61bef663a8af7ca7d5ceac3517c82db
Diffstat (limited to 'media/libeffects/downmix')
-rw-r--r--media/libeffects/downmix/EffectDownmix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libeffects/downmix/EffectDownmix.c b/media/libeffects/downmix/EffectDownmix.c
index a325172..302f1d7 100644
--- a/media/libeffects/downmix/EffectDownmix.c
+++ b/media/libeffects/downmix/EffectDownmix.c
@@ -610,7 +610,7 @@ int Downmix_setParameter(downmix_object_t *pDownmixer, int32_t param, size_t siz
}
value16 = *(int16_t *)pValue;
ALOGV("set DOWNMIX_PARAM_TYPE, type %d", value16);
- if (!((value16 > DOWNMIX_TYPE_INVALID) && (value16 < DOWNMIX_TYPE_LAST))) {
+ if (!((value16 > DOWNMIX_TYPE_INVALID) && (value16 <= DOWNMIX_TYPE_LAST))) {
ALOGE("Downmix_setParameter invalid DOWNMIX_PARAM_TYPE value %d", value16);
return -EINVAL;
} else {