1
我录制的声音与AVAudioRecorder(本教程http://www.tumblr.com/tagged/avaudiorecorder?before=1300075871),然后尝试播放录制的声音与CocosDenshion:录制的声音不带CocosDenshion打
CDSoundEngine* soundEngine = [[CDSoundEngine alloc] init];
NSArray *defs = [NSArray arrayWithObjects: [NSNumber numberWithInt:1],nil];
[soundEngine defineSourceGroups:defs];
//......
[soundEngine loadBuffer:1 filePath:[recorder.url path]];
[soundEngine playSound:1 sourceGroupId:0 pitch:2.0f pan:0 gain:1.0f loop:NO];
此代码工作在模拟器罚款,但对设备(新iPad 2,iOS 5.1.1) - 声音不播放。 我会尝试用AVAudioPlayer播放录制的声音 - 它的播放效果很好,但我需要调节声音,并发现使用CocosDenshion的是最简单的方法。 我应该检查或修复哪些设置或其他内容来播放录制的声音?