birdofpreyru/react-native-audio

Android: Patch SamplePlayer for Android 11

birdofpreyru opened this issue · 0 comments

Add SamplePlayer.builder.setMaxStreams(4); here:

static {
SamplePlayer.builder = new SoundPool.Builder();
}

Without it, it seems on Android 11 the SoundPool uses 1 stream max, and bumps into errors when playing samples in a quick succession.