Home / Companies / 100ms / Blog / Post Details
Content Deep Dive

How we built Local Audio Sharing in Android

Blog post from 100ms

Post Details
Company
Date Published
Author
Pratim Mallick
Word Count
1,367
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

A customer requested a feature for a social audio rooms app on Android, which involved transforming certain rooms into "radio stations" by allowing hosts to stream local music while speaking. Since WebRTC on mobile doesn't support adding custom audio tracks, significant modifications were made to the WebRTC source and Android SDK to enable mixing audio captured from the device's microphone with local audio. The process involved capturing microphone audio using WebRTC's JavaAudioDeviceModule and capturing local device audio with Android’s AudioRecord class, which required Android 10 or above. A callback mechanism was employed to synchronize the capture of audio bytes from both sources, which were then mixed programmatically to create a combined audio stream broadcasted to listeners. This solution also provides the flexibility to replace microphone audio with local audio if needed. The changes aim to enhance the app's functionality, and developers are encouraged to share feedback on the implementation through Discord.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 1,490 391 141 -13%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.