|
@@ -235,10 +235,12 @@ NSString* status = [NSString stringWithFormat:@"{\"current_position\": \"%@\"}",
|
|
|
error:nil];
|
|
|
|
|
|
[audioRecorder setDelegate:self];
|
|
|
- [audioRecorder record];
|
|
|
- [self startRecorderTimer];
|
|
|
+ if([audioRecorder prepareToRecord]) {
|
|
|
+ [audioRecorder record];
|
|
|
+ [self startRecorderTimer];
|
|
|
+ [audioRecorder setMeteringEnabled:shouldProcessDbLevel];
|
|
|
+ }
|
|
|
|
|
|
- [audioRecorder setMeteringEnabled:shouldProcessDbLevel];
|
|
|
if(shouldProcessDbLevel == true) {
|
|
|
[self startDbTimer];
|
|
|
}
|