Tag: wav

iPhone SDK:从一个button播放一个WAV

我目前正在尝试这个代码: NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; theAudio.delegate = self; [theAudio play]; 但是,SDK说ViewController没有实现AVAudioPlayer委托。 任何机构有关如何使用2.2 SDK播放WAV(或M4a)的任何想法?

从iOS设备的PhoneGap .wav上传正在服务器上创build一个0k文件

我正在尝试使用PhoneGap在iPhone上录制audio,然后将该audio发送到服务器。 我使用PhoneGaps Media API进行录制,然后使用PhoneGap文件传输API将文件发送到服务器。 我能够把录音做得很好,而且播放完美。 当我尝试将它发送到服务器,但是,logging显示在服务器上,但它说,该文件是0K大。 我在这个问题上进行了相当广泛的search,发现其他人有这个问题。 例如: https : //groups.google.com/forum/#!topic/phonegap/zjzSs6JVokE function win(r) { alert("Code = " + r.responseCode); alert("Response = " + r.response); alert("Sent = " + r.bytesSent); } function fail(error) { alert("An error has occurred: Code = " + error.code); console.log("upload error source " + error.source); console.log("upload error target " + error.target); } […]