¡@

Home 

2014/10/16 ¤W¤È 08:20:47

android Programming Glossary: onloadcomplete

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

periodically attempts to play the requested sounds at zero volume . If successful it calls your implementation of onLoadComplete like in the Android 2.2 version. Here's a usage example SoundPool mySoundPool new SoundPool 4 AudioManager.STREAM_MUSIC.. 0 OnLoadCompleteListener completionListener new OnLoadCompleteListener mySoundPool @Override public void onLoadComplete SoundPool soundPool int soundId int status Log.i OnLoadCompleteListener Sound soundId loaded. int soundId mySoundPool.load.. .. call OnLoadCompleteListener.listenFor soundId to periodically test sound load completion. If a sound is playable onLoadComplete is called. @param soundPool The SoundPool in which you loaded the sounds. public OnLoadCompleteListener SoundPool soundPool..

android soundpool heapsize overflow

http://stackoverflow.com/questions/7428448/android-soundpool-heapsize-overflow

id if soundId null soundPool.setOnLoadCompleteListener new SoundPool.OnLoadCompleteListener @Override public void onLoadComplete SoundPool soundPool int sampleId int status soundPool.play sampleId streamVolume streamVolume 1 0 1f try this.size.incrementAndGet..