Megabye: native code (LAME 3.100 MP3 encoder and a small bridge)
=================================================================

This folder holds the native code of the Android app Megabye
(app.megabye.videocompressor) by uladen, https://uladen.com/megabye/.
Megabye uses it to save the sound of a video as an MP3 file. It is the
same code the app is built from.

lame-3.100/     LAME 3.100, unchanged: README, LICENSE, COPYING (GNU Library
                General Public License, version 2), include/lame.h and the
                files of libmp3lame that Megabye compiles. The full LAME
                3.100 release is at
                https://sourceforge.net/projects/lame/files/lame/3.100/
lame-config/    config.h, used instead of the one LAME's ./configure writes.
Android.mk      ndk-build script. It builds two shared libraries:
                libmp3lame.so (LAME) and libmegabye_mp3.so (the bridge).
Application.mk  ndk-build settings: Android 10 (API 29) and later, 16 KB pages.
megabye_mp3.c   The bridge between the app (Kotlin, through JNI) and LAME.

Building
--------
The app builds this folder with Android NDK 29.0.14206865 through the
Android Gradle plugin. To build it by hand, run this in the folder:

    ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk NDK_APPLICATION_MK=Application.mk

On Windows, use ndk-build.cmd. The libraries end up in libs/<abi>/, for
arm64-v8a, armeabi-v7a, x86 and x86_64.

Megabye loads LAME as a separate shared library (libmp3lame.so). A
libmp3lame.so built from modified LAME sources can take its place.

Licence
-------
LAME is licensed under the GNU Library General Public License, version 2 or
(at your option) any later version; see lame-3.100/COPYING and
lame-3.100/LICENSE. Android.mk, Application.mk and lame-config/config.h
control how LAME is compiled and are distributed under the same licence.
megabye_mp3.c is part of Megabye; it is included so that you can build both
libraries the way the app does.
