资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

iOSAVAudioRecorder参数设置

 //------------------ 设置录音格式及参数 --------------------------
       NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
                                 [NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey,
                                 [NSNumber numberWithInt:kAudioFormatLinearPCM], AVFormatIDKey,
                                 [NSNumber numberWithFloat:8000.0], AVSampleRateKey,
                                 [NSNumber numberWithInt:16],  AVLinearPCMBitDepthKey,
                                 [NSNumber numberWithInt:1],   AVNumberOfChannelsKey,
                                 [NSNumber numberWithBool:NO], AVLinearPCMIsBigEndianKey,
                                 [NSNumber numberWithBool:NO], AVLinearPCMIsFloatKey, nil];

//        NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
//                                   [NSNumber numberWithInt:kAudioFormatLinearPCM],AVFormatIDKey,//格式
//                                   [NSNumber numberWithFloat:8000.0],AVSampleRateKey, //采样率8000次
//                                   [NSNumber numberWithInt:1], AVNumberOfChannelsKey, //通道的数目
//                                   [NSNumber numberWithInt:16],AVLinearPCMBitDepthKey, //采样位数 默认 16
//                                   [NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey, //大端还是小端 是内存的组织方式
//                                   [NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey, //采样信号是整数还是浮点数
//                                   //Encoder
//                                   [NSNumber numberWithInt:12800],AVEncoderBitRateKey, //解码率
//                                   [NSNumber numberWithInt:8],AVEncoderBitDepthHintKey, //位深度
//                                   [NSNumber numberWithInt:8],AVEncoderBitRatePerChannelKey, //声道采样率
//                                   [NSNumber numberWithInt:AVAudioQualityLow],AVEncoderAudioQualityKey, //音频编码质量
//                                   nil];

[[AVAudioRecorder alloc] initWithURL:[NSURL fileURLWithPath:cafFilePath] settings:settings error:&error];

为慈溪等地区用户提供了全套网页设计制作服务,及慈溪网站建设行业解决方案。主营业务为做网站、网站建设、慈溪网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!


名称栏目:iOSAVAudioRecorder参数设置
浏览地址:http://cdkjz.cn/article/jcheis.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220