296a0ec7e149b6b373b9271683eca286b1c376ed
The problem comes from the fact that when the duplicated output is closed after BT headset disconnection, the OUTPUT_CLOSED notification is not sent to AudioSystem. Then the mapping between notification stream and duplicated output cached in AudioSystem is not cleared and next time a notification is played, the duplicated output is selected and the createTrack() request is refused by AudioFlinger as the selected output doesn't exist. The notification is ignored by AudioFlinger because when it is sent by the terminating playback thread, the thread has already been removed from the playback thread list. The fix consists in sending the notification in closeOutput() and not when exiting the playback thread. The same fix is applied to record threads.
am
a6602f1f: Add docs for SDK update. Add redirects for preview files. Manually integrate a few doc changes from cupcake.
Description
No description provided
Languages
Java
73.7%
Kotlin
14%
PowerBuilder
5.8%
C++
5.2%
AIDL
1%