运行程序时出现此错误:
E/MediaPlayerNative:start called in state 0, mPlayer(...) error(-38, 0)
我尝试使用onPreparedListener
,但是我不确定如何使用它。关于这两个主题的任何帮助(为什么出错或onPreparedListener
)都将大有帮助。
public void onChallenge1Click(View view) {
Log.e("SynthesizerActivity", "Challenge 1 Button Clicked");
mpE.start();
delayPlaying(WHOLE_NOTE / 2);
mpFS.start();
delayPlaying(WHOLE_NOTE / 2);
mpGS.start();
delayPlaying(WHOLE_NOTE / 2);
mpA.start();
delayPlaying(WHOLE_NOTE / 2);
mpB.start();
delayPlaying(WHOLE_NOTE / 2);
mpCS.start();
delayPlaying(WHOLE_NOTE / 2);
mpDS.start();
delayPlaying(WHOLE_NOTE / 2);
mpHighE.start();
delayPlaying(WHOLE_NOTE / 2);
}