1
嘿,我想加載在其中包含睡眠指令線程內的Soundpool聲音。我說的是塊看起來像這樣:soundPool.load()裏面(等待)線程?
Thread wait = new Thread() {
@Override
public void run() {
try {
sleep(800);
soundsMap.put(SOUND5, soundPool.load(this, R.raw.w5, 1));
} catch (InterruptedException e) {
// blub
} finally {
}
}
};
wait.start();
蝕在load
標誌着一個錯誤,並寫道:
的方法
load(Context, int, int)
在類型SoundPool
不適用於參數(new Thread(){}, int, int)
有沒有人一個想法,我怎麼能解決這個問題?我真的不明白這封郵件想告訴我什麼。
謝謝你,解決它:) – user2330482 2013-05-07 03:30:50