Finding iPhone Audio Length

I record audio using avaudiorecorder. How to find record length after saving record in .caf file?

+6
source share
1 answer

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); 
+16
source

Source: https://habr.com/ru/post/888795/


All Articles