Has anyone else had this iphone sound problem?

I just had a really strange problem with the sound on my iphone 6s. It's fixed itself but I was just wondering if it has happened to anyone else. So I plugged my headphones in to listen to music and the songs sounded really weird. It sounded like there was an underwater effect on them? The pitch changed and it just sounded weird. I thought it was weird but i just figured that my headphones were broken. Just to make sure it was my headphones I unplugged them and played music out loud to see if it had the same weird sound. The music wouldn't play out loud. No matter how loud i had the sound up, no song would play out loud. I plugged the headphones into my moms phone to see if they would work on another phone and they sounded fine on hers. I turned my phone off and turned it back on and now the music sounds fine with and without headphones. It was just pretty weird. Has this happened to anyone else?

In the phone jack, there's a small 'switch' that detects when something is plugged in, and routes the audio signal through that plugged-in device (headset, speaker) instead of through the phone's speaker.

Sometimes, a bit of dust or debris may cause the switch to fail, to not notice when the headphone/speaker plug is removed. Thinking that there's still something attached, the phone's speaker doesn't work

There are various causes for this, including dust or dirt getting into the phone jack. The switch itself can also be a problem. Check on the internet to get suggestions on how to fix this. Sometimes it is as simple as blowing compressed air into the jack. Other times, it requires more effort. (The link has suggestions, but you'll find lots more online.)

I had something like that on my iPad. But only a few songs. And it would sound weird with headphones or through the speakers. Finally deleted the somgs and downloaded them again. Now all is good. So i have to blame Apple music.