HiFi
A high-performance, ad-free native music player for Android and Windows built with Kotlin Multiplatform and libmpv.








Why This Project
Most modern desktop music players rely on memory-heavy Electron wrappers laden with telemetry, while mobile streaming apps frequently restrict background playback with intrusive ads. HiFi was engineered to prove that a cross-platform music player can be 100% native, lightweight, ad-free, and privacy-first using Kotlin Multiplatform (KMP) and Compose Multiplatform—sharing over 90% of UI and business logic between Android and Windows without sacrificing low-level audio fidelity.
My Contribution
I architected HiFi using Clean Architecture and MVI/MVVM with Coroutines and StateFlow. The system features a dual-engine audio pipeline: AndroidX Media3/ExoPlayer on Android (integrated with MediaSessionService, Bluetooth headsets, and Android Auto), and native C/C++ libmpv-2.dll bindings on Windows for gapless, low-latency, Hi-Res lossless decoding (FLAC/Opus) at a fraction of Chromium's memory footprint. Data caching and network synchronization are driven by AndroidX Room SQLite and Ktor with connection pooling.
Key Features
- Ad-free streaming with background playback and Android Auto support
- Syllable-level real-time synced lyrics and multi-language translation
- Dual-engine audio: AndroidX Media3 (ExoPlayer) & native libmpv-2 C/C++ engine
- 10-band parametric equalizer, bass booster, and Spotify Canvas loop
- Smart chunked offline audio caching with LRU retention policy
- 100% privacy: zero analytics, zero trackers, open-source under GPL-3.0
Current Status
Production Release — v2.3.2 (Active & Maintained). Validated on physical Android hardware (Vivo V2039, Android 11+) and Windows 10/11 x64 workstations. Official Windows Inno Setup installer (HiFi-2.3.2-Setup.exe) and Android APKs (arm64-v8a, armeabi-v7a, universal) are published under GPL-3.0 on GitHub Releases.
Engineering Case Study & Technical Solutions
Architectural challenges and low-level solutions solved during the v2.3.0 production cycle.
Syllable-Level Real-Time Synced Lyrics
60/120 FPS RenderingChallenge: Unifying diverse timestamp formats from LRCLIB, Spotify, and YouTube TimedText into Compose Multiplatform with fluid word animations without dropping UI frames.
Solution: Architected a millisecond-precision coroutine audio progress interpolator that calculates active syllable timing and renders a real-time glow shader over active lyrics.
Smart Chunked Offline Audio Caching
SHA Checksum & LRUChallenge: Enabling instant zero-bandwidth offline playback for previously streamed songs while strictly preventing uncontrolled disk and RAM growth.
Solution: Implemented a chunked streaming write pipeline directly to local storage verified via checksum hashing and guarded by a Least Recently Used (LRU) disk eviction policy.
Windows Distribution Optimization
LZMA2 / 22% SmallerChallenge: Standard MSI installers caused system UAC permission conflicts, failed installations on non-admin accounts, and bloated package sizes beyond 228 MB.
Solution: Engineered an Inno Setup packaging pipeline with LZMA2/Ultra compression—reducing installer size by 22% to ~179 MB while bundling an isolated embedded JRE and native libmpv-2.dll.
Mobile Interface Showcase
A look inside the HiFi v2.3.0 mobile experience.
Official feature graphic and mobile app interface screenshots for HiFi v2.3.0.