RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
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参数设置
网页URL:http://sczitong.cn/article/jcheis.html