UNICORN WHO DEV
← Back to catalogue
Repositories / unicornwhodev

uwdev-mp3codec

MIT Android PCM-to-MP3 encoder with Kotlin/JNI API, qualified native AAR, Maven and npm distributions.

Open the public source
Overview

MIT Android PCM-to-MP3 encoder with Kotlin/JNI API, qualified native AAR, Maven and npm distributions.

Language
C++
Activity
Oct 22, 26
Source
GitHub
Status
Connected source
Public dossier

Documentation and scope

Structured content from the public source documentation.

01

Public documentation

Stable Android PCM-to-MP3 encoding library, version 0.2.0.

Encode interleaved PCM16LE into MPEG-1 Layer III locally on Android. The library includes its own C++ encoder, a Kotlin API, streaming output, cancellation and reconstructed-peak protection. No external encoder or network service is used.

Visual referenceuwdev-mp3codec · C++
02

Install with Gradle

Add the public, version-pinned Maven repository in settings.gradle.kts:

Then add the dependency to your Android module:

The release also provides a downloadable local Maven repository and a standalone AAR. See the integration guide for offline distribution, direct AAR installation, required Kotlin runtime and a safe export example.

03

Use the Android encoder

Run encoding on a worker thread. Each PCM block must contain complete channel frames.

The caller owns the output stream and destination. Publish the destination only after finish() and output close succeed. close() discards an unfinished export; cancel() can be called from another thread. API reference.

04

npm distribution

Install the public package from npm:

The npm registry and the GitHub release provide the same tarball. Direct installation from the release is also supported:

The npm package distributes the Android AAR and Maven repository, with small Node.js helpers that locate and verify them. It has no runtime dependencies and no install scripts. Encoding runs through the Android Kotlin/JNI API; this package does not provide JavaScript, browser or WebAssembly audio encoding.

05

Qualification

The released AAR is byte-identical to the artifact used for the completed audio qualification: 60 encodes on a physical Android device, 528 extended MPEG/peak checks, 264 signal cases and 204 edge cases. Android lifecycle and R8 consumer tests, three native ABIs, API 26, real 16 KiB emulator pages, ASan and UBSan were checked. Targeted human listening was accepted. Qualification summary.

The native stream includes encoder delay and terminal padding; version 0.2.0 does not write gapless metadata. Peak checks use the documented reconstruction method. See codec details and peak protection.

06

Build and test locally

Build tools: JDK 17, Android SDK 36, NDK 27.2.12479018 and CMake 3.22.1.

On Windows, use gradlew.bat. Kotlin consumers use Kotlin 2.2.21 and JVM target 17. All validation and publication commands are local; this repository contains no GitHub Actions workflows.

Provenance

A record traceable to its source

Editorial information, metadata and documentation remain connected to the original public repository.

Public identifier
unicornwhodev/uwdev-mp3codec
Latest activity
October 22, 2026
Read the complete documentation