Code example for SoundPool

Methods: load

0
                } 
            } 
        } 
 
        private int loadSound(int resId, int priority) {
            int id = mSoundPool.load(getApplicationContext(), resId, priority);
            if (id == 0) {
                Log.e(LOG_TAG, "Unable to open resource");
            } 
            return id;
        } 
 
        private int initSoundPool(int numStreams) throws java.lang.InterruptedException {
 
            if (mSoundPool != null) {
                if ((mMaxStreams == numStreams) && (mLoadStatus == 0)) return mLoadStatus;
                mSoundPool.release();
                mSoundPool = null;
            } 
 
            // create sound pool