Hey guys, I just wanted to point out something that is normally over looked when facing this issue, its something super silly and I know this wont solve the problem that some of you have but being that this is #1 on the google search for "no sound iPhone4" I figured that I would post what was found to be wrong with my bosses phone.
Take a look at the side of you phones, you should have your up and down voulme buttons and one switch. (see link)
http://imgs.sfgate.com/blogs/images/sfgate/techchron/2010/06/25/iphone4_buttonswitch624x371.jpg
When that switch is flipped and it shows the orange-red strip its being put into a vibrate mode, where the only sound that you will get out of the phone outside of its headset, headphones, and bluetooth is its speaker phone when turned on. Now when its flipped back and it shows grey it should work normally, all games, your iPod, and other sounds should go back to working just fine.
I hope this helps most of you!
~Ray