From ebe77ab1b4ac8ddb03671b0ef75cd76e729dc80e Mon Sep 17 00:00:00 2001 From: Joshua Sierles Date: Wed, 19 Oct 2016 19:34:44 +0200 Subject: [PATCH] add iOS support for AMR codec. Closes #100 --- README.md | 2 +- ios/AudioRecorderManager.m | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d24b69d3..c4abc24f 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ AudioQuality: string AudioEncoding: string ``` -Encodings supported on iOS: `lpcm, ima4, aac, MAC3, MAC6, ulaw, alaw, mp1, mp2, alac` +Encodings supported on iOS: `lpcm, ima4, aac, MAC3, MAC6, ulaw, alaw, mp1, mp2, alac, amr` Encodings supported on Android: `aac, aac_eld, amr_nb, amr_wb, he_aac, vorbis` #### iOS-only fields diff --git a/ios/AudioRecorderManager.m b/ios/AudioRecorderManager.m index 637fdf40..264e259c 100644 --- a/ios/AudioRecorderManager.m +++ b/ios/AudioRecorderManager.m @@ -143,6 +143,8 @@ - (NSString *) applicationDocumentsDirectory _audioEncoding =[NSNumber numberWithInt:kAudioFormatMPEGLayer2]; } else if ([encoding isEqual: @"alac"]) { _audioEncoding =[NSNumber numberWithInt:kAudioFormatAppleLossless]; + } else if ([encoding isEqual: @".amr"]) { + _audioEncoding =[NSNumber numberWithInt:kAudioFormatAMR]; } }