Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure out a way to capture the system audio of an Android and/or Windows Phone. The idea is to provide a stream based on the music I'm currently playing on my phone.

What I'm not sure about is what the best approach would be for sending the audio. Preferably I'd like to capture all the device audio (same as when connected to a bluetooth device). But I'm not sure whether this is possible with Android or Windows Phone.

For Android I found this article, he states this is'nt possible without making your own Android build. Which isn't an option for me.

For Windows Phone I can only find ways to capture audio from the mic. Not directly from the system.

The only alternative I can come up with is to let the app provide all the audio, meaning I would have to build all the basic mediaplayer functionality into the app. But this would mean I have to put much more work into the app, and I wouldn't be able to use other apps like Winamp and YouTube to provide audio.

Did I maybe overlook a way to capture all the audio of the device? Or maybe there's a way to capture audio from specific applications?


After doing some more research, I really doubt I can capture all system audio. Or maybe it's possible to simulate an bluetooth audio device?

For the Windows Phone I was going for the alternative solution: selecting songs which would then be streamed to the server. But it seems that for Windows Phone it's not even possible to get physical access to the songs:

share|improve this question

closed as unclear what you're asking by MichaelT, GlenH7, Bart van Ingen Schenau Nov 17 '15 at 19:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Here is a potential partial solution, though not really a programming solution.

Assuming the goal is specifically to have the audio of a music file from your mobile device play on another device, for example, a PC or server, you might try the OnAir player, which has apps for mobile devices, some televisions, and Mac/Linux/Windows computers.

If you have further processing to do with the audio, you an probably set up your computer to capture the audio and redirect it.

You don't state your final goal for the audio or what kind of server you are using for streaming, but here's a theoretical example setup:

I could run the app on my Android phone, streaming to my Linux PC. Pulse Audio (default on Ubuntu Linux) allows output capture, so I could write a program to receive the audio and redirect it to the input of a streaming program.

This would only cover the music you are playing from OnAir of course; none of the other sounds would come through (such as SMS and email notifications or the phone ringing).

Also note (as my second link points out): be careful with copyright restrictions on the audio. If you don't own the content and are streaming to other people you can get into trouble.



Capturing audio in Linux:

share|improve this answer

  • Use your telephone to listen to what's happening on your PC.

I think that you are going to play music from phone to pc.If so here is an android app that captures all your media sound and streams it to your connected pc with windows operating system running check this website

share|improve this answer

protected by Snowman Nov 17 '15 at 3:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.