我需要在 iOS 下以编程方式创建一个特定长度的虚拟 .m4a 文件...
最佳答案
试试这个
NSError *error = nil;
path = [path stringByAppendingPathComponent:@"tempfile"];
NSURL *URL = [NSURL fileURLWithPath:path];
[[NSFileManager defaultManager]createFileAtPath:path contents:nil attributes:nil]
NSFileHandle *writeFile = [NSFileHandle fileHandleForWritingToURL:URL error:&error];
[writeFile truncateFileAtOffset:4000000000*sizeof(Byte)];
关于ios - 如何在 iOS 下使用设备上的 CoreAudio 以编程方式创建一定长度的空 .m4a 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7011070/