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
diff --git a/media/libeffects/data/audio_effects.conf b/media/libeffects/data/audio_effects.conf
index ce25bc8..d681c69 100644
--- a/media/libeffects/data/audio_effects.conf
+++ b/media/libeffects/data/audio_effects.conf
@@ -18,6 +18,9 @@
pre_processing {
path /system/lib/soundfx/libaudiopreprocessing.so
}
+ downmix {
+ path /system/lib/soundfx/libdownmix.so
+ }
}
# list of effects to load. Each effect element must contain a "library" and a "uuid" element.
@@ -72,6 +75,10 @@
library visualizer
uuid d069d9e0-8329-11df-9168-0002a5d5c51b
}
+ downmix {
+ library downmix
+ uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f
+ }
agc {
library pre_processing
uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b