Skip to content

Commit

Permalink
fix(iOS): prevent crash with headset/bluetooth (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
agliber authored Feb 17, 2021
1 parent 8b70a8b commit 8481775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Voice/Voice.m
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ - (void) setupAndStartRecognizing:(NSString*)localeStr {
[mixer installTapOnBus:0 bufferSize:1024 format:recordingFormat block:^(AVAudioPCMBuffer * _Nonnull buffer, AVAudioTime * _Nonnull when) {
//Volume Level Metering
//Buffer frame can be reduced, if you need more output values
[buffer setFrameLength:4096];
[buffer setFrameLength: buffer.frameCapacity];
UInt32 inNumberFrames = buffer.frameLength;
float LEVEL_LOWPASS_TRIG = 0.5;
if(buffer.format.channelCount>0)
Expand Down

0 comments on commit 8481775

Please sign in to comment.