I am recording the audio using avaudiorecorder. How do I find the length of the recording after saving the recording in a .caf file?
You can use helpers in the CoreMedia framework.
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:avAudioRecorder.url options:nil];
CMTime time = asset.duration;
double durationInSeconds = CMTimeGetSeconds(time);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With