Although the Samsung Galaxy S7 is resistant to water and dust, it seems that at least the speaker can suffer when water enters it. Therefore any user could see how the sound of the speakers could be affected when the phone has been in contact with the water previously.
If this happens to you, the best thing to do is to avoid listening to music and let the speaker dry completely before it emits sound and recover the audio quality that the phone always had.