簡體   English   中英

在iPhone中查找錄音的長度

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM