[英]Finding the length of an audio recording in iPhone
我正在使用avaudiorecorder錄制音頻。 在.caf文件中保存錄制文件后如何找到錄制的長度?
您可以在CoreMedia框架中使用幫助程序。
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:avAudioRecorder.url options:nil];
CMTime time = asset.duration;
double durationInSeconds = CMTimeGetSeconds(time);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.