mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user