ERROR: 180: EXCEPTION thrown ('dev!'): - and ERROR:> aqsrv> 70: Exception caught in (null) - Error -1

ERROR: 180: EXCEPTION thrown ('dev!'): - and ERROR:> aqsrv> 70: Exception caught in (null) - Error -1

每次我调用我的函数使用 .wav 文件时,我都会收到这些错误:

ERROR: 180: EXCEPTION thrown ('dev!'): -

ERROR:> aqsrv> 70: Exception caught in (null) - Error -1 

它总是发生在 play() 行。

它只发生在 IOS - 在 android 它运行良好。

函数:

function sonido() {
    var cont=0;
    //console.log(arregloDetalles[cont].tVelocidad);
    var intervalo=setInterval(function() {
        if(bnaddetener==1){
            clearInterval(intervalo);
        }           
        if(arregloDetalles[cont].click_clack==1) {
            soundclick.play();

        } else {
            soundclack.play();
            console.log("Clack");
        }
        cont++;
        if(cont==arregloDetalles.length) {
            banderaclick=1;
            cont=0;
        }
    } ,arregloDetalles[cont].tVelocidad);
}

.wav 文件声明:

var soundclick = Titanium.Media.createSound({
        url:'/sonidos/beep-8.wav',
        preload:true
});
soundclick.addEventListener('complete', function(e) { soundclick.release(); });

var soundclack = Titanium.Media.createSound({
        url:'/sonidos/beep-7.wav',
        preload:true
});
soundclack.addEventListener('complete', function(e) { soundclack.release(); });

似乎正在尝试获取输入设备采样率。这不适用于 iOS 模拟器,您需要在真实设备上进行测试。

https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator.html