SoundPool: Assign the java piid to the AudioTrack

This allows to send native playback notifications for SoundPool players.

Test: dumpsys audio
Bug: 235521198
Change-Id: I7e743df4a16e0d8dae9f15f21fb4e8fa01aa4465
This commit is contained in:
Vlad Popa
2022-08-19 15:08:22 +02:00
parent f1d9af06a5
commit a6f2f169ca
8 changed files with 37 additions and 20 deletions

View File

@@ -311,7 +311,7 @@ public class SoundPool extends PlayerBase {
int priority, int loop, float rate) {
// FIXME: b/174876164 implement device id for soundpool
baseStart(0);
return _play(soundID, leftVolume, rightVolume, priority, loop, rate);
return _play(soundID, leftVolume, rightVolume, priority, loop, rate, getPlayerIId());
}
/**
@@ -512,7 +512,7 @@ public class SoundPool extends PlayerBase {
@NonNull Object/*AudioAttributes*/ attributes, @NonNull String opPackageName);
private native final int _play(int soundID, float leftVolume, float rightVolume,
int priority, int loop, float rate);
int priority, int loop, float rate, int playerIId);
private native final void _setVolume(int streamID, float leftVolume, float rightVolume);