开发者

Recorded voice notes slows the application

In my iPho开发者_运维知识库ne application, i am recording voice of user and saving it in device. My setting of AVAudioRecorder is as follows:

NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
    [recordSetting setValue :[NSNumber numberWithInt:kAudioFormatAppleIMA4] forKey:AVFormatIDKey];
    [recordSetting setValue:[NSNumber numberWithFloat:16000.0] forKey:AVSampleRateKey]; 
    [recordSetting setValue:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey];
    UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
    AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute,
                            sizeof(audioRouteOverride), &audioRouteOverride);

If I save more voices,the application gets slower and slower.I have kept Sample rate low to solve the purpose but even that not woked.What should I do?


I minimized the sample rate to 8000 which hammered the clarity of voice a bit but it solved my purpose.Hope this may help any other person having similar problem :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜