第一次按下按钮停止声音。但在那之后按下它没有任何效果。这是我的java代码:
public class App extends MultiTouchActivity {
SoundPool sp;
int dub1s;
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
sp = new SoundPool(5, AudioManager.STREAM_MUSIC, 0);
dub1s = sp.load(this, R.raw.dub1, 1);
}
public void dubstep1(View view) {
sp.stop(dub1s);
sp.play(dub1s, 1, 1, 1, 0, 1f);
}