私はiPhoneアプリケーションを開発しています。このアプリでは、オーディオの再生にAVAudioPlayerを使用しています。これは、サウンドを再生するための私のコードです。
NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
resourcePath = [resourcePath stringByAppendingString:@"/sound.mp3"];
NSError* err;
player_ = [[AVAudioPlayer alloc] initWithContentsOfURL:
[NSURL fileURLWithPath:resourcePath] error:&err];
if( err )
{
}
else
{
[player_ prepareToPlay];
[player_ play];
int playingLoops = 0;
player_.numberOfLoops = playingLoops;
}
iPhone5以外のiPhoneデバイスでは問題なく動作しています。iPhone5でアプリを実行していると、次のエラーが発生し、アプリがクラッシュします。
2012-11-26 09:02:28.484 test[728:1dd03] <0xb0081000> Error '!obj' trying to fetch default input device's sample rate
2012-11-26 09:02:28.484 test[728:1dd03] <0xb0081000> Error getting audio input device sample rate: '!obj'
2012-11-26 09:02:28.494 test[728:1dd03] <0xb0081000> AQMEIOManager::FindIOUnit: error '!dev'