0

I'm learning about android development. Let's say I want to be able to listen to spotify music in the background, while simultaneously listening to a spoken word podcast thru some other podcast app. Ive tried creating a Soundbuilder object and changed the maxStreams to 2 when I hit a togglebutton. However, when I run the app it makes no difference. Either spotify has the focus or the podcast app has focus.

Should I be utilizing the AudioManager class instead? To be able to eventually controll the volume of each stream independently? Also, would the phone have to be root to be able to change the maxStreams to 2?

user2314737
  • 27,088
  • 20
  • 102
  • 114

1 Answers1

0

I think You should check this example: MixingAudioInputStream.java
It's example taken from here
Check these out and try mixing both streams into single stream by Yourself - as trying to code new things is best way to learn.

Opos
  • 36
  • 3
  • Thanks, however since audio is streaming from spotify I would be unable to combine it to a wav file. I was able to play a podcast file from my app using a raw mp3 file and it plays while spotify is playing in the background. But would it be possible to play audio from two streaming sources (spotify app and podcast app) at the same time like how it can be done on a PC for example? – amsterdamAL Nov 10 '15 at 21:56