Code example for SoundPool

Methods: load

0
 
	public Sound createSound(String fileName) {
		try { 
			AssetFileDescriptor assetFileDescriptor = this.assetManager
					.openFd(fileName);
			int soundId = this.soundPool.load(assetFileDescriptor, 0);
			return new Sound(this.soundPool, soundId);
		} catch (IOException e) {
			throw new RuntimeException("Couldn't load sound '" + fileName + "'");
		} 
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE