Waiting for SoundPool to load before moving on with application

后端 未结 4 746
慢半拍i
慢半拍i 2020-12-20 22:39

I was following a tutorial to integrate SoundPool into my app, and this is the code which was given in the tutorial:

package com.example.soundpoolexample;

i         


        
4条回答
  •  星月不相逢
    2020-12-20 23:04

    I think while using SoundPool, everyone should pay attention to two cases:

    1. SoundPool is deprecated for API+21, instead you should use SoundPool.Builder
    2. If your SoundPool runs in the main thread, take it to another thread as it blocks your UI

提交回复
热议问题