audio测试异常处理。

This commit is contained in:
u0u0
2017-07-08 17:17:11 +08:00
parent 1eada40893
commit 1ddbdfd122
3 changed files with 15 additions and 7 deletions

View File

@@ -55,7 +55,9 @@ end
--------------- buffer -------------------
function audio.loadFile(path, callback)
if not audio._buffers[path] then
if audio._buffers[path] then
callback(path, true)
else
assert(callback, "ONLY support asyn load file, please set callback!")
Rapid2D_CAudio.newBuffer(path, function(buffID)
if buffID then