audiohal: Support stateful downmixer effects
Fraunhofer's downmixer has additional buffering, this is incompatible with how DownmixerBufferProvider used to process incomplete buffers. Now the effects HIDL wrapper delivers frameCount updates in audiobuffers to the server side. This fixes playback of multichannel sound streams. Bug: 36181621 Test: play 5.1 track from Play Music Change-Id: Iffe3327c6eedef85151eec2b41e0aedfb7ffa6dc
This commit is contained in:
parent
8de7a17b82
commit
c8c6a81f0f
1 changed files with 4 additions and 1 deletions
|
@ -30,7 +30,10 @@ bool AudioBufferManager::wrap(const AudioBuffer& buffer, sp<AudioBufferWrapper>*
|
|||
ssize_t idx = mBuffers.indexOfKey(buffer.id);
|
||||
if (idx >= 0) {
|
||||
*wrapper = mBuffers[idx].promote();
|
||||
if (*wrapper != nullptr) return true;
|
||||
if (*wrapper != nullptr) {
|
||||
(*wrapper)->getHalBuffer()->frameCount = buffer.frameCount;
|
||||
return true;
|
||||
}
|
||||
mBuffers.removeItemsAt(idx);
|
||||
}
|
||||
// Need to create and init a new AudioBufferWrapper.
|
||||
|
|
Loading…
Reference in a new issue