durCurrently i am working in iPhone application, Using AVAudioPlayer to play the audio file in my application, then get the duration value from AVAudioPlayer.
I get the duration value like : 252.765442.
but i want HH/MM/SS 02:52:76.
How to convert this, Please help me
Thanks in Advance..
I tried this:
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:tempFilePath] error:&err];
[audioPlayer setDelegate:self];
[audioPlayer prepareToPlay];
float duration = (float)audioPlayer.duration;
NSLog(@"duration:%f",duration);
1 Answer