aacオーディオファイルで動作するアプリをiOS6に移植していますが、奇妙な動作が見つかりました。(有効な)aacオーディオファイルの期間を取得しようとすると、常に0が返され、iOS4とiOS5では動作します。大丈夫。
¿AvAudioPlayerクラスにdurationプロパティに影響するバグはありますか?currentTimeプロパティに関するいくつかの問題について読みました。
コードは次のとおりです。
NSURL* urlFichero = [NSURL fileURLWithPath:rutaFichero];
avaPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: urlFichero error:nil];
segundos = avaPlayer.duration;
NSLog(@"[ControladorFicheros] Fichero: '%@' Duración: '%f'", nombreFichero, segundos);
[avaPlayer stop];
[avaPlayer release];
ありがとう ;)