Audio from 2 apps play together

I am working on a complex background sound system, intended to be played while reading a specific book. Whenever I start one of my apps, it shuts off sound from all other sources (even my hearing aids).

Is there a way to play my app at the same time as another plays, eg Audible? Is there any way to synchronize them, or embed another app in a window in my app? (I cannot just play the book audio in my app because of copyright.)

Maybe this Topic can help you:

Maybe you have this line of code:
audio.setSessionProperty( audio.MixMode, audio.AmbientMixMode )

you need to remove it.

I do not have that (or any audio.set…) in any of my code. Maybe it is set by default, or by something else I do? Anyway, I can look into the settings to see how to un-do it. I do not see that function in the documentation.

Thank you, perfect, though backwards. That audio.setSessionProperty MUST be set to share audio. When I ADDED audio.setSessionProperty( audio.MixMode, audio.AmbientMixMode ), then the sharing works.

Thank you for the pointer, that was perfect, just what I needed. Users just start my app, then start audible, then return to my app, and they continue together. No synchronization, but close enough. Apparently if I set my app to not pause when closed, it can work the other way, but I have not done this.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.