Search code examples
c#xamarinnaudiolame

Is there any way to use NAudio.Lame with Xamarin (Android/iOS) applications?


I'm trying to use NAudio.Lame to convert recorded audio from wav to mp3. I have installed the nugget package(v 1.1.1) with NAudio(1.1.0) but when I try to compile the application it shows this message:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Error XA2002: Can not resolve reference: `LameDLLWrap`, referenced by `NAudio.Lame`. Please add a NuGet package or assembly reference for `LameDLLWrap`, or remove the reference to `NAudio.Lame`. (XA2002) (MyApp.Droid)

The official page at GitHub says:

IMPORTANT: Because this wraps Windows native DLLs it will not work on any operating system. It may function with Windows emulation layers but I have never tested this.

Any chances of using it in a Xamarin Android/iOS project?


Solution

  • Based on Jason comments and NAudio.Lame official page, the answer is NO, because it depends on Windows DLLs that do not exist on iOS/Android.