I see you are still on 5.1.1 - so you have a pad 1? This showed up from time to time back then, and it was related to other apps not releasing the sound. Have you been using skype? (that was a culprit back then). In any event - try this - close off all apps completely, by double tapping the home key, and close off anything that shows in the recent tray. Then reboot by pressing and holding both the home and sleep buttons until you see the apple logo. ignore the red slider.
then try again and see if the problem is fixed. If it turns out to be skype - make sure you are using the most current version if you can. But it could be from amoe other app as well.
Try this - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) http://support.apple.com/kb/ht1430
Check your settings. The iPads have a small switch on the right edge. It can be used as a rotation lock to keep the screen from automatically reorienting itself as you move around, but you need to have the tablet’s settings configured properly. That same switch, right above the volume buttons, can also be set to function instead as a mute button to silence certain types of audio.
If the switch is set to work as a mute button, you can change its purpose to “screen-rotation lock” by tapping the Settings icon on the home screen. On the Settings screen, tap General on the left side, and on the right side of the screen flick down to “Use Side Switch to.” Tap to select Lock Rotation or Mute to set the button’s function. Even if you set the side switch for your preferred use, you can still mute the Mini or lock the screen. Just double-click the Home button, and when the panel of apps appears along the bottom edge of the screen, flick the row from left to right with your finger. Tap the icon on the far left side of the row to either lock the iPad’s screen or mute the iPad’s alerts, notifications and sound effects. Music, podcasts and video are not muted unless you turn the volume all the way down.
iPhone: No sound or distorted sound from speaker
iPhone: Can’t hear through the receiver or speakers
To solve some sound problems, just follow these simple steps
1. Go to Settings
2. Tap on General
3. Tap on Reset
4. Tap on Reset All Settings
What this effectively does is to reset some of your Settings to factory default. It’s not a complete removal of settings. It removes all of your preferences for Wi-Fi, Bluetooth, Do No Disturb, Notifications, General, Sounds, Brightness & Wallpaper and Privacy. It doesn’t affect your data. All of your email accounts will remain intact, as well as any SMS text or iMessages.