From 7d5b26230a179cd7bcc01f6578cd80d8c15a92a5 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Wed, 4 Apr 2012 18:54:36 -0700 Subject: 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 --- media/libeffects/downmix/EffectDownmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libeffects/downmix') 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 { -- cgit v1.1