我们正在使用PhoneGap 3.4。我们按照此处的说明安装了LowLatencyAudio插件:https://github.com/triceam/LowLatencyAudio
但是,我们看到以下错误:
2014-03-10 19:59:25.960 S[7828:60b] CDVPlugin class LowLatencyAudio (pluginName: LowLatencyAudio) does not exist.
2014-03-10 19:59:25.962 S[7828:60b] ERROR: Plugin 'LowLatencyAudio' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-03-10 19:59:25.963 S[7828:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [
"INVALID",
"LowLatencyAudio",
"preloadFX",
[
"sounds\/right.mp3",
"sounds\/wrong.mp3"
]
]
映射确实存在于config.xml中。我们用以下代码调用代码:
LowLatencyAudio.preloadFX( GUESS_RIGHT_SOUND, GUESS_RIGHT_SOUND);
LowLatencyAudio.preloadFX( GUESS_WRONG_SOUND, GUESS_WRONG_SOUND);
我们也尝试过:
PGLowLatencyAudio.preloadFX( GUESS_RIGHT_SOUND, GUESS_RIGHT_SOUND);
PGLowLatencyAudio.preloadFX( GUESS_WRONG_SOUND, GUESS_WRONG_SOUND);
两种方法都失败了,只有LowLatencyAudio
一种方法会生成错误消息。