How we built Local Audio Sharing in Android

What's this blog post about?

The text discusses the implementation of a feature for an Android social audio rooms app, where users can host talk shows and stream local music simultaneously. To achieve this, significant changes were made to WebRTC and the Android SDK. The solution involved capturing audio from both the device's microphone and local device, then mixing them together programmatically before streaming as a single audio stream. This was accomplished by creating callbacks for when data is read from the microphone and using Android's AudioRecord class to capture system audio. Finally, the two audio streams were combined into one using a custom function.


Date published
Feb. 5, 2023

Pratim Mallick

Word count

Hacker News points
None found.


By Matt Makai. 2021-2024.