After a quick look at this page I found the problem. Keep in mind the iPhone 4 is just a test device for me, not my actual phone so I don't use it for anything else but testing.
https://developer.apple.com/library...ogrammingGuide/Introduction/Introduction.html
I found the solution when I read "Should your app's audio be silenced by the Ring/Silent switch?.."
So that is what that little switch is on the side of the phone;-)
So I toggled the switch and now I get sound with the B4i app.
Can B4i add an option to control whether to use this silence switch? The default would seem to be that B4i mediaplayer honors it which may not be what the developer wants to happen.
I think the default should be to not honor the silence switch like all the other apps that play sound.
This explains why the Piano app was able to play sound and B4i was not and also why the ear buds always worked.