错误:180:exception抛出('dev!'): – 和错误:> aqsrv> 70:捕获exception(null) – 错误-1

每次我打电话给我的函数使用.wav文件,我得到这些错误:

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

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

它总是发生在play()的行中。

它只发生在IOS – 在Android上运行良好。

function:

 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(); }); 

似乎正在尝试获取input设备的采样率。 这不会在iOS模拟器上工作,你需要在真实的设备上testing。

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