I have recorded an audio file in .wav format with AudioStreamer library.
I am able to correctly hear the .wav file produced.
I tried to convert the wav files to mp3 with liblameEncoder library.
I use this code:
But I have this error:
I am able to correctly hear the .wav file produced.
I tried to convert the wav files to mp3 with liblameEncoder library.
I use this code:
B4X:
Try
Dim LameEncoder As liblameEncoder
LameEncoder.Initialize("LameEncoder")
If LameEncoder.SetFiles(File.Combine(perc_to_save, mFileName), File.Combine(perc_to_save, mFileNameMP3)) Then
ProgressDialogShow2("Encoding...", False)
LameEncoder.Encode
Else
Log("An error occurred while calling LameEncoder.SetFiles")
CallSub2(module, eventName,"KO")
End If
Catch
Log(LastException)
End Try
But I have this error:
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/uniplan.map-1/lib/arm/liblame.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:384)
at java.lang.System.loadLibrary(System.java:1086)
at net.sourceforge.lame.Lame.<clinit>(Lame.java:36)
at com.intervigil.lame.Encoder.initialize(Encoder.java:52)
at uk.co.martinpearman.b4a.liblame.EncoderWrapper.SetFiles(EncoderWrapper.java:92)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:259)
at uniplan.map.audiogestclass._converti_to_mp3(audiogestclass.java:275)
at uniplan.map.audiogestclass._stop(audiogestclass.java:176)
at uniplan.map.frmmainautista._btnmanaudiostop_click(frmmainautista.java:2444)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:5273)
at android.view.View$PerformClick.run(View.java:21315)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5665)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:822)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:712)