A tool based on libopencore-amr
package to convert audio between AMR
format and WAV
format.
iOS6.0+, Xcode8.0+
To integrate AudioConverter into your Xcode project using CocoaPods, specify it in your Podfile:
pod 'FSAudioConverter'
If you use CocoaPods to install, you cannot use
use_frameworks!
, it must be imported as a static library, otherwise the compilation will fail.
If you prefer not to use any of the aforementioned dependency managers, you can integrate FSAudioConverter into your project manually. Download the repository and add the FSAudioConverter
folder to your project.
The currently used libopencore-amr
libraries does not support Bitcode, so this component is not suitable for use in TARGET with Enable Bitcode = Yes
. Information related to Bitcode can be found here.
import "AudioConverter.h"
// Convert amr to wav format.
[AudioConverter convertAmrToWavAtPath:<#amrFilePath#> wavSavePath:<#wavSavePath#> asynchronize:<#asynchronize#> completion:^(BOOL success, NSString * _Nullable resultPath) {
}];
// Convert wav to amr format.
[AudioConverter convertWavToAmrAtPath:<#wavFilePath#> amrSavePath:<#amrSavePath#> asynchronize:<#asynchronize#> completion:^(BOOL success, NSString * _Nullable resultPath) {
}];
AudioConverter is released under the MIT license. See LICENSE for details.