using Lame dll in Unity3d

921 views Asked by At

I am trying to use LAME in Unity3d on OS X with Mono c#. I dragged the Lame_enc.dll in but when the wrapper tries to find it, it doesn't and i get

DllNotFoundException: Lame_enc.dll
Yeti.MMedia.Mp3.Mp3Writer..ctor (System.IO.Stream Output, WaveLib.WaveFormat InputDataFormat, Yeti.Lame.BE_CONFIG Mp3Config) (at Assets/Helping Libraries/Lame/Mp3Writer.cs:82)

The problem from what i see, it when i try to 'link' some static methods to the dll:

 [DllImport("Lame_enc.dll")]
    public static extern uint beInitStream(BE_CONFIG pbeConfig, ref uint dwSamples, ref uint dwBufferSize, ref uint phbeStream);

I know that in order to see dll, on Windows, the dll needs to be in the same folder as the .exe file, but Unity being a multiplatform solution, i don't know how i can tell it where it is.

I've placed the dll in my project root folder, in the Library, in the Editor, but no luck!

1

There are 1 answers

0
kolgenius On

Just remove the ".dll",it will work well in Editor,but won't work on mobile phone.I removed the using xxx.window and some unused files,but still the output file xx.mp3 only has 44B.