Set output volume for routing device in startSource()
getNewOutputDevice selects a device by checking active strategy when startSouce() is called. This behavior sometimes leads to set unsupported device volume index. For example, BT A2DP resume from combo output. a2dp output only supports A2DP sound devices. If sonification stream is played via A2DP and Speaker during music playback, volume index for speaker is applied as music volume when resume playback until sonification stream is closed. At this time, A2DP device is selected as routing device, so volume and routed device does not match. To avoid this situation, setting volume index from supported device in startSource(). Bug: 64053820 Test: Check volume after alarm sound finish during music playback via BT. Change-Id: I71dae2c77d82abc0227ec45fc6c40bfd8f51c8c2
Loading
Please register or sign in to comment