iOS代码创建无声音乐方法

代码创建无声音乐方法
const char bytes[] = {0x52, 0x49, 0x46, 0x46, 0x26, 0x0, 0x0, 0x0, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6d, 0x74, 0x20, 0x10, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x44, 0xac, 0x0, 0x0, 0x88, 0x58, 0x1, 0x0, 0x2, 0x0, 0x10, 0x0, 0x64, 0x61, 0x74, 0x61, 0x2, 0x0, 0x0, 0x0, 0xfc, 0xff};

网站建设哪家好,找成都创新互联公司!专注于网页设计、网站建设、微信开发、成都小程序开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了汝阳免费建站欢迎大家使用!

    NSData* data = [NSData dataWithBytes:bytes length:sizeof(bytes)];
    NSString * docsDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];

    // Build the path to the database file
    NSString * filePath = [[NSString alloc] initWithString:
                           [docsDir stringByAppendingPathComponent: @"background.wav"]];
    [data writeToFile:filePath atomically:YES];

当前标题:iOS代码创建无声音乐方法
当前网址:http://azwzsj.com/article/ijoggs.html