|
|
@ -5710,7 +5710,10 @@ uint32_t AudioPolicyManager::setOutputDevices(const sp<SwAudioOutputDescriptor>&
|
|
|
|
patchBuilder.addSink(filteredDevice);
|
|
|
|
patchBuilder.addSink(filteredDevice);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
installPatch(__func__, patchHandle, outputDesc.get(), patchBuilder.patch(), delayMs);
|
|
|
|
// Add half reported latency to delayMs when muteWaitMs is null in order
|
|
|
|
|
|
|
|
// to avoid disordered sequence of muting volume and changing devices.
|
|
|
|
|
|
|
|
installPatch(__func__, patchHandle, outputDesc.get(), patchBuilder.patch(),
|
|
|
|
|
|
|
|
muteWaitMs == 0 ? (delayMs + (outputDesc->latency() / 2)) : delayMs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// update stream volumes according to new device
|
|
|
|
// update stream volumes according to new device
|
|
|
|