Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以通过查看文件大小来获得 iLBC 语音长度?这有什么公式吗?
文件大小是否与语音长度成正比?
只需使用 NSFileManager:
NSFileManager *fm = [[NSFileManager alloc] init]; NSDictionary *attrs = [fm attributesOfItemAtPath:recordedFile.path error: NULL]; NSLog(@"File size: %@", [NSString stringWithFormat:@"%lld", [attrs fileSize]]);