简体   繁体   中英

Convert audio file to mp3

I have a record function in iOS project which is supposed to create a audio file in mp3 format. I did some r&d and looks like we cannot create mp3 audio file in iOS. Only way to do it is to convert it to .mp3 file. For now I can create a audio file .aac format so Is there a way to convert it to .mp3 in Xamarin?

As I understand it, the technology to encode MP3 files is patented, and in order to do it you need to get a license.

Just about everybody uses the LAME library, which is distributed as source code. (Since LAME is distributed as source it avoids the patent issue, but you, as the developer of a product that encodes MP3, are likely in violation of the patent.) That's probably what you'll have to do for iOS as well.

You'll need to get the LAME source in C, build it into an iOS static library (using Xcode) and add that to your project. You should then be able to call it from Xamarin. Do some Googling on "iOS LAME library."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM