I want to play my guitar via iRig through my computer with my iPhone 4
If you absolutely postively must play it through your computer (see below for better options), you could try installing XBMC on your computer and using AirPlay off your iPhone to play through your computer speakers.

Better options: attach the speakers on your computer (if you have external speakers) to the headphone jack; get a 1/4 inch to 1/8 inch adapter and plug it into the microphone port on your computer, then pirate acquire Ableton Live; get a decent audio interface for your computer, you'll get way better sound out of it.