// 耗时操作, 在主线程
AVURLAsset *avUrl = [AVURLAsset assetWithURL:[NSURL URLWithString:bodiesModel.url]];
CMTime time = [avUrl duration];
int seconds = ceil(time.value/time.timescale);
在工程中连接CoreMedia和AVFoundation框架
// 耗时操作, 在主线程
AVURLAsset *avUrl = [AVURLAsset assetWithURL:[NSURL URLWithString:bodiesModel.url]];
CMTime time = [avUrl duration];
int seconds = ceil(time.value/time.timescale);
在工程中连接CoreMedia和AVFoundation框架
本文标题:计算音频长度
本文链接:https://www.haomeiwen.com/subject/kodcmttx.html
网友评论