If you are experiencing no sound from any of your android applications/apps and the ringer is still working, I may have a fix for you. The issue is most likely due to your headphone jack, either via software or physically (port may be dirty and shorting the connection so the device thinks there is a headphone plugged in).
Fix 1 - Check Android Services
Go to Settings, Apps/App Info, Choose Disabled Apps (or All Apps if you don't have this option) and look for any that may be related to sound. Re-enable it and reboot the device. If that does not work or nothing is disabled that may be affecting sound, move on to fix #2.
Fix 2 - Install Headphone Disable App
Install a headphone disabling app from the app store and disable the headphone and that should work. Be sure that you trust the app and the app permissions are acceptable to you. I take no responsibility for any app you install. I tested using the iTech Solutions Apps (4th from the left below), which worked, however I did not like the permissions it required so I uninstalled it until I can find a better one.
Hope this works for you like it did for me! Comment and let me know.