On Android 4.1 (Samsung Galaxy S2) audio playback (via headphone) automatically pauses and continues when some alarm was played via internal speakers. Same thing happens when playing a ring tone (incoming call).
Foobar 2000 Mobile, however only pauses playback, but never continues. I'd prefer at setting where playback continues after such events.