OSDN Git Service
Enable aux effect attachment before the AudioTrack creation.
When an OpenSL ES AudioPlayer is playing content from a URI or FD,
the AudioTrack it plays on is only created once prefetching is
far along enough that the playback properties are known (channel
count, word size and sample rate). This happens after Realize()
is called on the AudioPlayer. If, before the AudioTrack is created,
the SLEffectSendItf interface is used to configure the aux send
for that player, there is no AudioTrack to configure.
The fix consists in keeping track of the effect the track needs
to be attached to, and with what level. Once the track is
created, and it gets configured (volume, mutes, channel solos,
marker callbacks) we also attach it to the aux effect if
necessary.
Change-Id: I12230a8cbf7dc3876d3713a006b9702d44e9d6e5