【发布时间】:2013-04-29 01:48:23
【问题描述】:
嘿,我想在包含睡眠命令的线程内的 soundPool 上加载声音。我正在谈论的块看起来像这样:
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();
Eclipse 在load 标记一个错误并写道:
SoundPool类型中的方法load(Context, int, int)不适用于参数(new Thread(){}, int, int)
有人知道我该如何解决这个问题吗?我真的不明白消息想告诉我什么。
【问题讨论】:
标签: android multithreading soundpool