' LameEncoder.SetQuality(LameEncoder.LAME_PRESET_STANDARD) ' adjust to suit If LameEncoder.SetFiles(File.Combine(File.DirRootExternal, "file_to_encode.wav"), File.Combine(File.DirRootExternal, "encoded_file.mp3")) Then Log("An error occurred while calling LameDecoder.SetFiles") If LameDecoder.SetFiles(File.Combine(File.DirRootExternal, "encoded_file.mp3"), File.Combine(File.DirRootExternal, "decoded_file.wav")) Then Sub Activity_Pause (UserClosed As Boolean) If File.Exists(File.DirRootExternal, "file_to_encode.wav")=False Thenįile.Copy(File.DirAssets, "file_to_encode.wav", File.DirRootExternal, "file_to_encode.wav")Īctivity.AddView(DecodeButton, 0, 0, 100%x, 75dip)Īctivity.AddView(EncodeButton, 0, 75dip, 100%x, 75dip) ' ** the example project does NOT contain file_to_encode.wav ** Sub Activity_Create(FirstTime As Boolean) The Encoder will default to Quality of Encoder.LAME_PRESET_DEFAULT. ![]() Set the source wav and destination mp3 file names. Initialize the Encoder with an event name. The event EncodeComplete(Success As Boolean) will be raised on completion. Set the source mp3 and destination wav file names. SetFiles (InputFilename As String, OutputFilename As String) As Boolean.Initialize the Decoder with an event name. The event DecodeComplete(Success As Boolean) will be raised on completion. The library is pretty simple to use, it adds a liblameDecoder object and a liblameEncoder object to your project: Lame4Android is a complete Android application that puts everything together.libwave contains some helper classes required to load and save wav type files. ![]() liblame is the port of the C LAME library to Android.This B4A library wraps various pieces of 3rd party code that is all licenced under the LGPLv2: Here we have a fully functional stereo encoder and somewhat unpredictable decoder. Liblame MP3 encoder and decoder library for B4A
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |