How can i get time of my recorded audio in iphone?
问题 I am recording audio using AVAudioRecorder ,and now i want to get exact time duration of my recorded audio,how can i get that. i have tried this: AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:avAudioRecorder.url options:nil]; CMTime time = asset.duration; double durationInSeconds = CMTimeGetSeconds(time); But my time variable return NULL and durationInSeconds return 'nan',what does that means by nan. UPDATE user1903074 answer have solved my problem but just for curiosity ,is thair any