I GOT MINE FIXED!!! I'm on a T-Mobile S7 non-edge
My symptoms - Audio would cut out from speaker playing Youtube, Pandora etc. after about 2-5 seconds. Would close application re-open, sound would work for a few seconds and cut out again. If I plugged in a jack into the headphone socket and unplug it, the sound would play for a few seconds and cut out again. Sound from headphone jack works fine but not the speakers. I even did a factory reset and it did not fix the issue.
FIX - PRESS "UP VOLUME" + "HOME" + "POWER", it takes a screenshot.
I had to do this a couple times for it to work. I don't know why this fixed it but it did, I pulled this answer from another thread. They said the sound could cut out again, and to just press those buttons again if it happens. But so far mines been good.