I have a recently developed a strange problem with my iPhone 4S. If I start playing audio (the two apps I've noticed this problem with are RSSRadio7 and Spotify, although I assume it affects other audio-based apps too), approximately 50% of the time the audio stops (it quickly fades out and the phone "pauses" it) after about 1-2 minutes, although the exact time period seems to be random. Sometimes it happens almost straight away. Sometimes it seems to happen when I put it in my pocket, sometimes when it's on the desk. I'm confident that I'm not touching any buttons or the screen. If I turn the phone on, I can see on the homescreen that the audio is paused, and if I hit "play" it continues, although sometimes it then pauses again shortly afterward in the same time. This never used to happen (started a month or so ago, I've been using the phone and those apps for years).
What could be causing this? I'd love to hear if there are any potential software causes, as then I could investigate and come up with a workaround. I can't think of anything significant I've changed recently, settings-wise; but I suppose it's possible. Is there a common hardware fault which might cause this?