作者:恋你
时间:2012.1.12
package com.shiqiu.yinxiao;
/*
播放小于7秒的音效
1. sp=new SoundPool()对象
a.构造方法:public SoundPool(int maxStreams,int streamType,int srcQuality)//SoundPool(同时播放音效数量,音频类型(游戏中通常STREAM_MUSIC)音频质量(通常0))
b.加载资源:public int load(Context context,int resID,int priority)
//解释下:lodd(上下文(Activity),资源文件ID(R.raw.attack02),优先级(设置为1,方便后期使用)
在这里需要配合着spMap=new HashMap<Integer,Integer>();
......
阅读全文